diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c5c9e60..9858e272 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,12 @@ jobs: - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/magic-nix-cache-action@main - run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH - - run: nix flake check --print-build-logs + - run: nix build .#simple-tests --print-build-logs - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./result/coverage.xml lint: runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index ad8e8b92..fca52d7c 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,4 @@ venv/ venv-*/ .venv/ node_modules/ +result/ diff --git a/flake.nix b/flake.nix index 0ec8d8f8..d5299d8c 100644 --- a/flake.nix +++ b/flake.nix @@ -102,8 +102,18 @@ doCheck = false; }; in { - checks = rec { - default = simple-tests; + packages = rec { + default = tested; + tested = poetry.mkPoetryApplication { + inherit (tested-env) + projectDir python overrides propagatedBuildInputs; + doCheck = false; + postInstall = '' + wrapProgram "$out/bin/tested" \ + --prefix NODE_PATH : ${ast}/lib/node_modules + ''; + }; + devShell = self.outputs.devShells.${system}.default; simple-tests = pkgs.stdenvNoCC.mkDerivation { name = "simple-tests"; src = self; @@ -117,23 +127,10 @@ poetry run pytest -n auto --cov=tested --cov-report=xml tests/test_functionality.py ''; installPhase = '' - touch $out # it worked! - ''; - }; - }; - - packages = rec { - default = tested; - tested = poetry.mkPoetryApplication { - inherit (tested-env) - projectDir python overrides propagatedBuildInputs; - doCheck = false; - postInstall = '' - wrapProgram "$out/bin/tested" \ - --prefix NODE_PATH : ${ast}/lib/node_modules + mkdir -p $out + cp coverage.xml $out/coverage.xml ''; }; - devShell = self.outputs.devShells.${system}.default; }; devShells = rec {