-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (33 loc) · 1.06 KB
/
ci.yml
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
38
39
40
41
42
43
44
45
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Nix
uses: cachix/install-nix-action@v14
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Run Nix development shell
run: nix develop --command just format-nix
- name: Format Python code with Black
run: nix develop --command just format-python
- name: Check Python code with Ruff
run: nix develop --command just check-ruff
- name: Check Python code with Mypy
run: nix develop --command just check-mypy
- name: Run tests
run: nix develop --command just test
- name: Run flake checks (optional)
run: nix develop --command just flake-check
continue-on-error: true
- name: Run developer tests
if: github.event_name == 'push' && github.event.head_commit.message == 'run dev tests'
run: nix develop --command just test-dev