-
Notifications
You must be signed in to change notification settings - Fork 1
feat: cluster test framework #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DaRacci
wants to merge
17
commits into
master
Choose a base branch
from
push-xvsqsqnwmrup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
adcb184
feat: cluster test framework
DaRacci b01e734
chore: openspec for testing framework
DaRacci de92f15
docs(testing): update design docs for pre-deploy VM integration tests
DaRacci 5516012
feat(vm-test): add NixOS VM integration testing framework for server …
DaRacci 7171bea
refactor(test-vm): remove unused inputs param, humanize comments
DaRacci 96be296
fix(test-vm): wire server.tests.units, fix postgres-backup scenario
DaRacci bfeb083
fix(test-vm): inject scenario name from directory
DaRacci f0978b2
docs(openspec): comprehensive-server-tests proposal, design, tasks
DaRacci 011e1f6
feat(test): Phase 1+2 server tests — 56 targets, all pass QEMU
DaRacci 7135633
refactor: make external imports conditional and streamline VM test in…
DaRacci 6a41e02
test: overhaul VM tests with real sops-encrypted dummy secrets and im…
DaRacci d600b72
refactor(vm-tests): drop upstream-only test scenarios and auto-discov…
DaRacci 14ec571
chore: address PR comments, remove useless tests and clean other slop
DaRacci 5cd503f
docs(openspec): add behavioral VM integration tests for custom modules
DaRacci 0f80484
feat(tests): add scenarios and host unit tests
DaRacci ee6bdc9
feat(server): complete VM integration tests for all behavior scenarios
DaRacci 6e708f4
feat(ssh-shell): add SSH_NIX_COMMAND for one-shot remote command exec…
DaRacci File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # PR-only, KVM. | ||
| # Build nixosTestConfigurations.* for affected server/scenario hosts. | ||
| # Independent of check.yaml. | ||
|
|
||
| labels: | ||
| platform: linux/amd64 | ||
| kvm: true | ||
|
|
||
| when: | ||
| - event: pull_request | ||
|
|
||
| steps: | ||
| - name: Build VM tests | ||
| image: registry.racci.dev/lix-woodpecker:latest | ||
| pull: true | ||
| environment: | ||
| binary_cache_token: | ||
| from_secret: binary_cache_token | ||
| commands: | | ||
| nix run .#setup-attic -- --watch | ||
| nix run .#archive-flakes -- "." "flake/nixos" | ||
|
|
||
| - name: Run VM tests | ||
| image: registry.racci.dev/lix-woodpecker:latest | ||
| commands: | | ||
| affected_hosts=$(git diff --name-only "origin/${CI_COMMIT_TARGET_BRANCH:-main}...HEAD" 2>/dev/null | grep -oP '(?<=^hosts/server/)[^/]+' | sort -u) | ||
| affected_scenarios=$(git diff --name-only "origin/${CI_COMMIT_TARGET_BRANCH:-main}...HEAD" 2>/dev/null | grep -oP '(?<=^tests/scenarios/)[^/]+' | sort -u) | ||
| if [ -z "$affected_hosts" ] && [ -z "$affected_scenarios" ]; then | ||
| hosts=$(nix eval .#nixosTestConfigurations --apply 'builtins.attrNames' --json | jq -r '.[]') | ||
| else | ||
| hosts=$(printf '%s\n%s' "$affected_hosts" "$affected_scenarios" | sort -u) | ||
| fi | ||
| failed=0 | ||
| for host in $hosts; do | ||
| echo "::group::VM test: $host" | ||
| nix build ".#nixosTestConfigurations.$host" --no-link -L || { failed=1; echo "FAILED: $host"; } | ||
| echo "::endgroup::" | ||
| done | ||
| exit $failed | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.