mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
Merge #345
345: also test nix-unstable r=Mic92 a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
commit
2e0ab68af4
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 ]
|
||||
# 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 }}"
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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} .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue