Split CI into multiple tasks.
This commit is contained in:
parent
da584442d3
commit
014f915869
2 changed files with 73 additions and 13 deletions
79
.github/workflows/CI_NixPy.yml
vendored
79
.github/workflows/CI_NixPy.yml
vendored
|
@ -10,13 +10,9 @@ on:
|
|||
jobs:
|
||||
|
||||
## tasks per matrix element
|
||||
nixVersion:
|
||||
name: Test Nix version - ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, ]
|
||||
python-version: [3.7]
|
||||
cli-test:
|
||||
name: Test mach-nix cli - ${{ matrix.os }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -45,8 +41,73 @@ jobs:
|
|||
mach-nix env ./env -r reqs.txt
|
||||
shell: bash
|
||||
|
||||
- name: mach-nix evaluation tests
|
||||
unit-tests:
|
||||
name: Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install/Setup - NIX
|
||||
uses: cachix/install-nix-action@v13
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
install_url: https://releases.nixos.org/nix/nix-2.6.0/install
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
sandbox = true
|
||||
sandbox-fallback = false
|
||||
|
||||
- name: mach-nix unit tests
|
||||
run: |
|
||||
WORKERS=5 nix run .#tests-all
|
||||
WORKERS=5 nix run .#tests-unit
|
||||
shell: bash
|
||||
|
||||
eval-tests:
|
||||
name: Eval Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install/Setup - NIX
|
||||
uses: cachix/install-nix-action@v13
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
install_url: https://releases.nixos.org/nix/nix-2.6.0/install
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
sandbox = true
|
||||
sandbox-fallback = false
|
||||
|
||||
- name: mach-nix eval tests
|
||||
run: |
|
||||
WORKERS=5 nix run .#tests-eval
|
||||
shell: bash
|
||||
|
||||
conda-eval-tests:
|
||||
name: Eval Tests (with conda)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install/Setup - NIX
|
||||
uses: cachix/install-nix-action@v13
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
install_url: https://releases.nixos.org/nix/nix-2.6.0/install
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
sandbox = true
|
||||
sandbox-fallback = false
|
||||
|
||||
- name: mach-nix eval tests
|
||||
run: |
|
||||
WORKERS=5 CONDA_TESTS=y nix run .#tests-eval
|
||||
shell: bash
|
||||
|
||||
|
|
|
@ -132,19 +132,18 @@
|
|||
])}"
|
||||
|
||||
cd tests
|
||||
echo "executing evaluation tests (without conda)"
|
||||
echo "executing evaluation tests"
|
||||
./execute.sh
|
||||
|
||||
echo "executing evaluation tests (with conda)"
|
||||
CONDA_TESTS=y ./execute.sh
|
||||
'');
|
||||
};
|
||||
|
||||
apps.tests-all = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writeScript "tests-eval" ''
|
||||
set -e
|
||||
${apps.tests-unit.program}
|
||||
${apps.tests-eval.program}
|
||||
CONDA_TESTS=y ${apps.tests-eval.program}
|
||||
'');
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue