-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CI setup with Justfiles * Update Justfile * Update Justfile * Update ci.yml * Update struct_parser.py * Fixed mypy errors
- Loading branch information
1 parent
c685077
commit dc0f8a3
Showing
5 changed files
with
114 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
format-nix: | ||
alejandra . | ||
|
||
format-python: | ||
black probe_src/probe_py | ||
|
||
check-ruff: | ||
ruff check probe_src/probe_py | ||
|
||
check-mypy: | ||
(cd probe_src && mypy --package probe_py --strict) | ||
|
||
test: | ||
python -m pytest probe_src/probe_py | ||
|
||
test-dev: | ||
python -m pytest probe_src/probe_py --failed-first --maxfail=1 | ||
|
||
flake-check: | ||
nix flake check --all-systems |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters