-
-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
083ee16
commit 0c7e844
Showing
1 changed file
with
32 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,9 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
permissions: | ||
id-token: "write" | ||
contents: "read" | ||
contents: write | ||
actions: read | ||
checks: write | ||
steps: | ||
- name: "Checkout 🥡" | ||
uses: "actions/checkout@v4" | ||
|
@@ -62,4 +64,33 @@ jobs: | |
tree ./result | ||
./result/bin/quickemu --help | ||
./result/bin/quickget --help | ||
./result/bin/quickreport | ||
# Text a VM if the Nix Installer successfully enabled KVM | ||
if [ $DETERMINATE_NIX_KVM -eq 1 ]; then | ||
./result/bin/quickget alpine v3.20 | ||
./result/bin/quickemu --vm alpine-v3.20.conf --display none | ||
sleep 5 | ||
if pgrep -F ./alpine-v3.20/alpine-v3.20.pid; then | ||
echo "Test VM is running" | ||
echo "Waiting a few seconds before capturing a screenshot" | ||
sleep 5 | ||
./result/bin/quickemu --vm alpine-v3.20.conf --monitor-cmd "screendump test.ppm" | ||
nix shell nixpkgs#imagemagick -c magick convert test.ppm test.png | ||
else | ||
echo "Test VM is not running" | ||
exit 1 | ||
fi | ||
# Test a few more quickemu commands to clean up | ||
./result/bin/quickemu --vm alpine-v3.20.conf --kill | ||
./result/bin/quickemu --vm alpine-v3.20.conf --delete-disk | ||
./result/bin/quickemu --vm alpine-v3.20.conf --delete-vm | ||
fi | ||
- name: Upload test results 📸 | ||
if: ${{ success() }} | ||
uses: edunad/[email protected] | ||
with: | ||
path: './test.png' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
title: 'Screenshot of test VM' | ||
|
||
|