mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
also test nix-unstable
This commit is contained in:
parent
ba2b0a2b81
commit
e3d41d9c39
4 changed files with 16 additions and 9 deletions
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
|
|
@ -13,6 +13,7 @@ jobs:
|
||||||
os: [ ubuntu-latest ]
|
os: [ ubuntu-latest ]
|
||||||
# FIXME macos garbage currently collect also nix-shell that runs the test
|
# FIXME macos garbage currently collect also nix-shell that runs the test
|
||||||
#os: [ ubuntu-latest, macos-latest ]
|
#os: [ ubuntu-latest, macos-latest ]
|
||||||
|
nix: [ stable, unstable ]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
@ -24,4 +25,4 @@ jobs:
|
||||||
keep-derivations = true
|
keep-derivations = true
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
- run:
|
- run:
|
||||||
"nix run --accept-flake-config .#test-runner"
|
"nix run --accept-flake-config .#test-runner-${{ matrix.nix }}"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ status = [
|
||||||
"check lint [x86_64-linux]",
|
"check lint [x86_64-linux]",
|
||||||
"devShell default [x86_64-linux]",
|
"devShell default [x86_64-linux]",
|
||||||
"package 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]",
|
"package test-runner-unstable [x86_64-linux]",
|
||||||
"tests (ubuntu-latest)"
|
"tests (ubuntu-latest, stable)",
|
||||||
|
"tests (ubuntu-latest, unstable)"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,12 @@
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
default = pkgs.callPackage ./default.nix { };
|
default = pkgs.callPackage ./default.nix { };
|
||||||
test-runner = pkgs.callPackage ./test-runner.nix { };
|
test-runner-stable = pkgs.callPackage ./test-runner.nix {
|
||||||
test-runner-unstable = pkgs.callPackage ./test-runner.nix { };
|
nixVersion = "stable";
|
||||||
|
};
|
||||||
|
test-runner-unstable = pkgs.callPackage ./test-runner.nix {
|
||||||
|
nixVersion = "unstable";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
devShells.default = pkgs.callPackage ./shell.nix { };
|
devShells.default = pkgs.callPackage ./shell.nix { };
|
||||||
apps.test-runner = {
|
apps.test-runner = {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
{ writeScript
|
{ writeShellScriptBin
|
||||||
, direnv
|
, direnv
|
||||||
, python3
|
, python3
|
||||||
, lib
|
, lib
|
||||||
, nix
|
|
||||||
, coreutils
|
, coreutils
|
||||||
, gnugrep
|
, gnugrep
|
||||||
|
, nixVersions
|
||||||
|
, nixVersion
|
||||||
}:
|
}:
|
||||||
writeScript "test-runner" ''
|
writeShellScriptBin "test-runner-${nixVersion}" ''
|
||||||
set -e
|
set -e
|
||||||
export PATH=${lib.makeBinPath [ direnv nix coreutils gnugrep ]}
|
export PATH=${lib.makeBinPath [ direnv nixVersions.${nixVersion} coreutils gnugrep ]}
|
||||||
|
|
||||||
echo run unittest
|
echo run unittest
|
||||||
${lib.getExe python3.pkgs.pytest} .
|
${lib.getExe python3.pkgs.pytest} .
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue