mirror of
https://github.com/Phundrak/georm.git
synced 2025-12-16 17:51:52 +01:00
chore: add CI and issue templates
This commit is contained in:
47
.github/workflows/ci.yaml
vendored
Normal file
47
.github/workflows/ci.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
env:
|
||||
DATABASE_URL: postgresql://georm:georm@postgres:5432/georm
|
||||
|
||||
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: georm
|
||||
POSTGRES_USER: georm
|
||||
POSTGRES_DB: georm
|
||||
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
|
||||
Reference in New Issue
Block a user