on: workflow_dispatch: # allows manual triggering pull_request: types: - opened - synchronize - reopened push: branches: - main jobs: check-pre-commit: runs-on: native steps: - uses: actions/checkout@v4 - run: nix-build -A tests check-data-model: runs-on: native steps: - uses: actions/checkout@v4 - run: nix-shell --run 'nix-unit ./deployment/data-model-test.nix' check-mastodon: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.test-mastodon-service -L check-peertube: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.test-peertube-service -L check-panel: runs-on: native steps: - uses: actions/checkout@v4 - run: nix-build -A tests.panel check-proxmox-basic: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.proxmox-basic -L check-deployment-basic: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-basic -L check-deployment-cli: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-cli -L check-deployment-panel: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-panel -L check-deployment-model-ssh: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-model-ssh -L check-deployment-model-nixops4: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-model-nixops4 -L check-deployment-model: runs-on: native steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-model -L ## NOTE: NixOps4 does not provide a good “dry run” mode, so we instead check ## proxies for resources, namely whether their `.#vmOptions.` and ## `.#nixosConfigurations.` outputs evaluate and build correctly, and ## whether we can dry run `infra/proxmox-*.sh` on them. This will not catch ## everything, and in particular not issues in how NixOps4 wires up the ## resources, but that is still something. check-resources: runs-on: native steps: - uses: actions/checkout@v4 - run: | set -euC echo ==================== [ VM Options ] ==================== machines=$(nix eval --impure --raw --expr 'with builtins; toString (attrNames (getFlake (toString ./.)).vmOptions)') for machine in $machines; do echo ~~~~~~~~~~~~~~~~~~~~~: $machine :~~~~~~~~~~~~~~~~~~~~~ nix build .#checks.x86_64-linux.vmOptions-$machine done echo echo ==================== [ NixOS Configurations ] ==================== machines=$(nix eval --impure --raw --expr 'with builtins; toString (attrNames (getFlake (toString ./.)).nixosConfigurations)') for machine in $machines; do echo ~~~~~~~~~~~~~~~~~~~~~: $machine :~~~~~~~~~~~~~~~~~~~~~ nix build .#checks.x86_64-linux.nixosConfigurations-$machine done