1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-03-16 05:28:15 +00:00
sops-nix/.github/workflows/test.yml

33 lines
1 KiB
YAML
Raw Normal View History

2020-07-12 17:33:08 +01:00
name: "Test"
on:
pull_request:
schedule:
- cron: '51 2 * * *'
jobs:
tests:
strategy:
matrix:
nixPath:
2020-11-08 14:48:21 +01:00
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-20.09.tar.gz
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz
2020-07-22 15:57:46 +01:00
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
2020-07-12 17:33:08 +01:00
steps:
- uses: actions/checkout@v2
2020-11-13 09:33:09 +01:00
- uses: cachix/install-nix-action@v12
2020-07-12 17:33:08 +01:00
with:
nix_path: "${{ matrix.nixPath }}"
2020-11-13 09:33:09 +01:00
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
2020-07-12 17:33:08 +01:00
- name: Setup cachix
2020-11-18 21:10:33 +01:00
uses: cachix/cachix-action@v8
2020-07-12 17:33:08 +01:00
with:
name: mic92
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
2020-07-12 22:10:56 +01:00
- name: Add keys group (needed for go tests)
run: sudo groupadd keys
2020-07-22 15:57:46 +01:00
if: matrix.os == 'ubuntu-latest'
2020-11-13 10:39:17 +01:00
- name: Build nix packages
run: nix-build --no-out-link release.nix
- name: Run unit tests
run: nix-shell --no-out-link ./unit-tests.nix --argstr sudo "$(command -v sudo)" --pure --run 'true'