50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
name: "CI"
|
|
on:
|
|
pull_request:
|
|
push:
|
|
jobs:
|
|
tests-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v18
|
|
with:
|
|
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
|
|
- run: nix build
|
|
- run: nix build .#doc
|
|
- run: nix fmt . -- --check
|
|
- run: nix flake check
|
|
- name: "Flake.lock health check"
|
|
shell: bash
|
|
run: |
|
|
(
|
|
set -eu
|
|
curl --max-time 2 --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/flake-checker/stable/$RUNNER_ARCH-$RUNNER_OS > "$RUNNER_TEMP/flake-checker"
|
|
chmod +x "$RUNNER_TEMP/flake-checker"
|
|
"$RUNNER_TEMP/flake-checker"
|
|
) || true
|
|
tests-darwin:
|
|
runs-on: macos-11
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v18
|
|
with:
|
|
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
|
|
- run: nix build
|
|
- run: nix build .#doc
|
|
- run: nix fmt . -- --check
|
|
- run: nix flake check
|
|
- name: "Install nix-darwin module"
|
|
run: |
|
|
system=$(nix build --no-link --print-out-paths .#checks.x86_64-darwin.integration)
|
|
${system}/activate-user
|
|
sudo ${system}/activate
|
|
- name: "Test nix-darwin module"
|
|
run: |
|
|
sudo /run/current-system/sw/bin/agenix-integration
|
|
- name: "Test home-manager module"
|
|
run: |
|
|
# Do the job of `home-manager switch` in-line to avoid rate limiting
|
|
nix build .#homeConfigurations.integration-darwin.activationPackage
|
|
./result/activate
|
|
~/agenix-home-integration/bin/agenix-home-integration
|