Skip to content

Commit

Permalink
Merge pull request NixOS#1310 from gilligan/ci-scripts
Browse files Browse the repository at this point in the history
Extract ci actions to ./ci/ scripts
  • Loading branch information
grahamc authored Apr 20, 2020
2 parents f660466 + 4ebb18b commit 01b3127
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Nix
uses: cachix/install-nix-action@v8
- name: Parsing
run: 'find . -name "*.nix" -exec nix-instantiate --parse --quiet {} >/dev/null +'
run: './ci/check-nix-files.sh'
build:
runs-on: ubuntu-latest
steps:
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Nix
uses: cachix/install-nix-action@v8
- name: Black
run: 'nix-shell --run "black . --check --diff"'
run: './ci/check-formatting.sh'
mypy:
runs-on: ubuntu-latest
steps:
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Nix
uses: cachix/install-nix-action@v8
- name: Mypy
run: 'nix-shell --run "mypy nixops"'
run: './ci/check-mypy.sh'
mypy-ratchet:
runs-on: ubuntu-latest
steps:
Expand All @@ -58,5 +58,4 @@ jobs:
- name: Nix
uses: cachix/install-nix-action@v8
- name: Coverage
run: |
nix-shell --run "./coverage-tests.py -a '!libvirtd,!gce,!ec2,!azure' -v"
run: './ci/check-tests.sh'
4 changes: 4 additions & 0 deletions ci/check-formatting.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell ../shell.nix -i bash

black . --check --diff
4 changes: 4 additions & 0 deletions ci/check-mypy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell ../shell.nix -i bash

mypy nixops
3 changes: 3 additions & 0 deletions ci/check-nix-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

find . -name "*.nix" -exec nix-instantiate --parse --quiet {} >/dev/null +
4 changes: 4 additions & 0 deletions ci/check-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell ../shell.nix -i bash

./coverage-tests.py -a '!libvirtd,!gce,!ec2,!azure' -v

0 comments on commit 01b3127

Please sign in to comment.