diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc8424a..a667ed8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ jobs: os: [ ubuntu-latest ] # FIXME macos garbage currently collect also nix-shell that runs the test #os: [ ubuntu-latest, macos-latest ] + nix: [ stable, unstable ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -24,4 +25,4 @@ jobs: keep-derivations = true experimental-features = nix-command flakes - run: - "nix run --accept-flake-config .#test-runner" + "nix run --accept-flake-config .#test-runner-${{ matrix.nix }}" diff --git a/bors.toml b/bors.toml index b133757..8a57a6f 100644 --- a/bors.toml +++ b/bors.toml @@ -4,7 +4,8 @@ status = [ "check lint [x86_64-linux]", "devShell default [x86_64-linux]", "package default [x86_64-linux]", - "package test-runner [x86_64-linux]", + "package test-runner-stable [x86_64-linux]", "package test-runner-unstable [x86_64-linux]", - "tests (ubuntu-latest)" + "tests (ubuntu-latest, stable)", + "tests (ubuntu-latest, unstable)" ] diff --git a/flake.nix b/flake.nix index 705a139..e25d39e 100644 --- a/flake.nix +++ b/flake.nix @@ -15,8 +15,12 @@ { packages = { default = pkgs.callPackage ./default.nix { }; - test-runner = pkgs.callPackage ./test-runner.nix { }; - test-runner-unstable = pkgs.callPackage ./test-runner.nix { }; + test-runner-stable = pkgs.callPackage ./test-runner.nix { + nixVersion = "stable"; + }; + test-runner-unstable = pkgs.callPackage ./test-runner.nix { + nixVersion = "unstable"; + }; }; devShells.default = pkgs.callPackage ./shell.nix { }; apps.test-runner = { diff --git a/test-runner.nix b/test-runner.nix index 53374a6..19520a6 100644 --- a/test-runner.nix +++ b/test-runner.nix @@ -1,14 +1,15 @@ -{ writeScript +{ writeShellScriptBin , direnv , python3 , lib -, nix , coreutils , gnugrep +, nixVersions +, nixVersion }: -writeScript "test-runner" '' +writeShellScriptBin "test-runner-${nixVersion}" '' set -e - export PATH=${lib.makeBinPath [ direnv nix coreutils gnugrep ]} + export PATH=${lib.makeBinPath [ direnv nixVersions.${nixVersion} coreutils gnugrep ]} echo run unittest ${lib.getExe python3.pkgs.pytest} .