-
-
Save kourtni/7ee2749b0bb75253e0d29d2deab1b4fb to your computer and use it in GitHub Desktop.
devenv test swallows errors and test failures if enterTest ends with a command that exits normally
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
{ pkgs, lib, config, inputs, ... }: | |
{ | |
# https://devenv.sh/basics/ | |
env.GREET = "devenv"; | |
# https://devenv.sh/packages/ | |
packages = [ | |
pkgs.git | |
]; | |
# https://devenv.sh/scripts/ | |
scripts.hello.exec = "echo hello from $GREET"; | |
enterShell = '' | |
hello | |
git --version | |
''; | |
# https://devenv.sh/tests/ | |
# The error for not having poetry installed is surpressed by adding the final echo statement. | |
enterTest = '' | |
echo "Running tests" | |
poetry run coverage run -m pytest --setup-show && poetry run coverage report -i | |
echo "*** Finished UNIT TEST! ***" | |
''; | |
} |
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
inputs: | |
nixpkgs: | |
url: github:cachix/devenv-nixpkgs/rolling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment