-
-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (34 loc) · 824 Bytes
/
nix.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Nix
on:
pull_request:
push:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
run: |
sudo apt-get install -y mariadb-client postgresql-client
- name: Databases
run: docker compose up -d
- name: Run tests
run: cargo test --verbose
nix:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Databases
run: docker compose up -d
- name: Nix flake check
run: nix flake check
- name: Test nix build
env:
DATABASE_URL: psql://postgres:mysecretpassword@localhost:6437/app?sslmode=disable
run: nix run . -- up