-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): implement Nix testing as separate derivation from env (#…
…10473) Co-authored-by: Phillip Cloud <417981+cpcloud@users.noreply.github.com>
- Loading branch information
1 parent
321a382
commit ddeecce
Showing
6 changed files
with
123 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ pkgs, deps }: | ||
let | ||
inherit (pkgs) stdenv; | ||
in | ||
final: prev: { | ||
ibis-framework = prev.ibis-framework.overrideAttrs (old: { | ||
passthru = old.passthru // { | ||
tests = old.passthru.tests or { } // { | ||
pytest = | ||
let | ||
pythonEnv = final.mkVirtualEnv "ibis-framework-test-env" (deps // { | ||
# Use default dependencies from overlay.nix + enabled tests group. | ||
ibis-framework = deps.ibis-framework or [ ] ++ [ "tests" ]; | ||
}); | ||
in | ||
stdenv.mkDerivation { | ||
name = "ibis-framework-test"; | ||
nativeCheckInputs = [ pythonEnv pkgs.graphviz-nox ]; | ||
src = ../.; | ||
doCheck = true; | ||
preCheck = '' | ||
set -euo pipefail | ||
ln -s ${pkgs.ibisTestingData} $PWD/ci/ibis-testing-data | ||
HOME="$(mktemp -d)" | ||
export HOME | ||
''; | ||
checkPhase = '' | ||
runHook preCheck | ||
pytest -m datafusion | ||
pytest -m 'core or duckdb or sqlite or polars' --numprocesses $NIX_BUILD_CORES --dist loadgroup | ||
runHook postCheck | ||
''; | ||
|
||
installPhase = "mkdir $out"; | ||
}; | ||
}; | ||
}; | ||
}); | ||
} |