diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e114165d..7358d185 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -54,7 +54,17 @@ jobs: - name: kairos x86_64-linux if: matrix.os == 'ubuntu-latest' - run: nix build -L --no-link --show-trace .#packages.x86_64-linux.kairos + run: nix build -L --out-link kairos-result --show-trace .#packages.x86_64-linux.kairos + + - name: Create JUnit Kairos Test Report x86_64-linux + if: matrix.os == 'ubuntu-latest' + run: cat kairos-result/test-result.json | nix run nixpkgs#cargo2junit > kairos-test-result.xml + + - name: Publish Kairos Test Report + uses: mikepenz/action-junit-report@v4 + if: matrix.os == 'ubuntu-latest' || success() || failure() # always run even if the previous step fails + with: + report_paths: '*test-result.xml' - name: kairos x86_64-darwin if: matrix.os == 'macos-latest' diff --git a/flake.nix b/flake.nix index 77b8f4ba..a179adac 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ ]; perSystem = { config, self', inputs', system, pkgs, lib, ... }: let - rustToolchain = inputs'.fenix.packages.stable.toolchain; + rustToolchain = inputs'.fenix.packages.latest.toolchain; craneLib = inputs.crane.lib.${system}.overrideToolchain rustToolchain; kairosNodeAttrs = { @@ -83,6 +83,11 @@ kairos = craneLib.buildPackage (kairosNodeAttrs // { cargoArtifacts = self'.packages.kairos-deps; + cargoTestExtraArgs = "-- -Z unstable-options --format json --report-time | tee test-output.json"; + postCheck = '' + mkdir -p $out + cp test-output.json $out + ''; }); default = self'.packages.kairos;