Skip to content

Commit

Permalink
.github/nix: archive coverage files
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Jul 24, 2024
1 parent 6375b98 commit 8b1b71a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ jobs:
- run: nix build -L

- run: nix flake check -L

- uses: actions/upload-artifact@v4
with:
name: coverage
path: |
hyprland.{out,html}
6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@
''
glxinfo -B > "$HOME/glxinfo"
cd "${./.}"
go test -cover -v ./... > "$HOME/test.log" 2>&1
go test -coverprofile "$HOME/hyprland.out" -v > "$HOME/test.log" 2>&1
echo "$?" > "$HOME/test-finished"
go tool cover -html="$HOME/hyprland.out" -o "$HOME/hyprland.html"
hyprctl dispatch exit
'';
hyprlandConf =
Expand Down Expand Up @@ -116,6 +117,9 @@
print(machine.succeed("cat ${home}/glxinfo || true"))
print(machine.succeed("cat ${home}/test.log"))
print(machine.succeed("exit $(cat ${home}/test-finished)"))
machine.copy_from_vm("${home}/hyprland.out")
machine.copy_from_vm("${home}/hyprland.html")
'';
};
}
Expand Down

0 comments on commit 8b1b71a

Please sign in to comment.