chore: add CI and issue templates
All checks were successful
CI / tests (push) Successful in 4m56s

This commit is contained in:
Lucien Cartier-Tilet 2025-01-31 23:09:40 +01:00
parent 003af71107
commit adeba2f18a
Signed by: phundrak
GPG Key ID: 347803E8073EACE0
4 changed files with 143 additions and 0 deletions

60
.github/ISSUE_TEMPLATE/BUG-REPORT.yml vendored Normal file
View File

@ -0,0 +1,60 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug/unconfirmed"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: expected-behaviour
attributes:
label: Expected behaviour
description: How do you expect Georm to behave?
value: "Something should happen"
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: Actual behaviour
description: How does the actual behaviour differ from the expected behaviour?
value: "Something else happened"
validations:
required: true
- type: dropdown
id: package-version
attributes:
label: Georm version
description: What version of Georm are you using?
options:
- main
- develop
- something else (please specify)
- type: dropdown
id: source
attributes:
label: Library source
description: From which source did you get the backend?
options:
- Crates.io
- Git version
- something else (please specify)
- type: textarea
id: rust-version
attributes:
label: Rust version
description: Which version of Rust did you use to build Georm?
value: "Rust 1.y.z"
- type: textarea
id: logs
attributes:
label: Relevant code or log output
description: Please copy and pase any relevant code or log output. This will be automatically formatted into code, so no need for backticks
render: text
- type: textarea
id: other-info
attributes:
label: Other relevant information
description: Please provide any other information which could be relevant to the issue (PostgreSQL version? Upstream bug?)

View File

@ -0,0 +1,33 @@
name: Feature Request
description: Request a new feature
title: "[Feature Request]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to request a new feature!
- type: textarea
id: feature-description
attributes:
label: New feature
description: Description of the new feature
value: "New automatic method should do thing"
validations:
required: true
- type: textarea
id: feature-reason
attributes:
label: Why this new feature
description: Describe why this new feature should be added to Georm
value: "I use that workaround very often, this new method will simplify it"
validations:
required: true
- type: textarea
id: ideas-implementation
attributes:
label: Implementation ideas and additional thoughts
description: Do you have an idea on how to implement it?
value: "It could be implemented doing foo, bar, and baz"
validations:
required: false

47
.github/workflows/ci.yaml vendored Normal file
View File

@ -0,0 +1,47 @@
name: CI
on:
pull_request:
push:
env:
DATABASE_URL: ${{ vars.DATABASE_URL }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'ref/heads/master' }}
jobs:
tests:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:js-latest
options: --security-opt seccomp=unconfined
permissions:
pull-requests: write
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: ${{ vars.DB_PASSWORD }}
POSTGRES_USER: ${{ vars.DB_USER }}
POSTGRES_DB: ${{ vars.DB_NAME }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 10s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Migrate database
run: nix develop --command -- just migrate
- name: Formatting check
run: nix develop --command -- just format-check
- name: Lint
run: nix develop --command -- just lint
- name: Audit
run: nix develop --command -- just audit
- name: Tests
run: nix develop --command -- just test

View File

@ -14,6 +14,9 @@ lint:
audit:
cargo deny check all
migrate:
cargo sqlx migrate run
build:
cargo build