agenix/.github/workflows/ci.yaml

52 lines
1.6 KiB
YAML
Raw Normal View History

2021-11-20 22:30:40 +03:00
name: "CI"
on:
pull_request:
push:
jobs:
tests-linux:
2023-01-29 19:27:20 +03:00
runs-on: ubuntu-latest
steps:
2023-01-29 19:27:20 +03:00
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
system-features = nixos-test recursive-nix benchmark big-parallel kvm
extra-experimental-features = recursive-nix nix-command flakes
- run: nix build
- run: nix build .#doc
2023-01-29 19:27:20 +03:00
- run: nix fmt . -- --check
- run: nix flake check
tests-darwin:
runs-on: macos-12
2021-11-20 22:30:40 +03:00
steps:
2023-01-29 19:27:20 +03:00
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v24
2021-11-20 22:37:06 +03:00
with:
extra_nix_config: |
system-features = nixos-test recursive-nix benchmark big-parallel kvm
extra-experimental-features = recursive-nix nix-command flakes
2021-11-20 22:37:06 +03:00
- run: nix build
- run: nix build .#doc
2023-01-29 19:27:20 +03:00
- run: nix fmt . -- --check
2021-11-20 22:31:38 +03:00
- run: nix flake check
2023-05-04 02:25:54 +03:00
- name: "Install nix-darwin module"
run: |
# https://github.com/ryantm/agenix/pull/230#issuecomment-1867025385
sudo mv /etc/nix/nix.conf{,.bak}
nix \
--extra-experimental-features 'nix-command flakes' \
build .#checks.x86_64-darwin.integration
./result/activate-user
sudo ./result/activate
2023-05-04 02:25:54 +03:00
- 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