diff --git a/.github/workflows/CI_NixPy.yml b/.github/workflows/CI_NixPy.yml index 173c7fc..ef66a05 100644 --- a/.github/workflows/CI_NixPy.yml +++ b/.github/workflows/CI_NixPy.yml @@ -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 diff --git a/flake.nix b/flake.nix index 7ab3f30..34fe3e9 100644 --- a/flake.nix +++ b/flake.nix @@ -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} ''); };