345: also test nix-unstable r=Mic92 a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
bors[bot] 2023-05-23 15:27:42 +00:00 committed by GitHub
commit 2e0ab68af4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 9 deletions

View file

@ -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 }}"

View file

@ -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)"
]

View file

@ -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 = {

View file

@ -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} .