mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-03-31 04:14:37 +00:00
ci: add macOS support
This commit is contained in:
parent
3095053dd4
commit
8c33651e0c
1 changed files with 8 additions and 5 deletions
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
|
@ -11,7 +11,8 @@ jobs:
|
||||||
nixPath:
|
nixPath:
|
||||||
- nixpkgs=channel:nixos-20.03
|
- nixpkgs=channel:nixos-20.03
|
||||||
- nixpkgs=channel:nixpkgs-unstable
|
- nixpkgs=channel:nixpkgs-unstable
|
||||||
runs-on: ubuntu-latest
|
os: [ ubuntu-latest, macos-latest ]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: cachix/install-nix-action@v10
|
- uses: cachix/install-nix-action@v10
|
||||||
|
@ -29,9 +30,11 @@ jobs:
|
||||||
if: matrix.nixPath == 'nixpkgs=channel:nixpkgs-unstable'
|
if: matrix.nixPath == 'nixpkgs=channel:nixpkgs-unstable'
|
||||||
- name: Build nix packages
|
- name: Build nix packages
|
||||||
run: nix run nixpkgs.nix-build-uncached -c nix-build-uncached default.nix
|
run: nix run nixpkgs.nix-build-uncached -c nix-build-uncached default.nix
|
||||||
- name: Add keys group (needed for go tests)
|
|
||||||
run: sudo groupadd keys
|
|
||||||
- name: Run sops-install-secrets tests
|
|
||||||
run: nix-shell --pure --run "$(command -v sudo) unshare --mount --fork go test ./pkgs/sops-install-secrets"
|
|
||||||
- name: Run sops-pgp-hook tests
|
- name: Run sops-pgp-hook tests
|
||||||
run: nix-shell --pure --run "NIX_PATH=nixpkgs=$(nix-instantiate --find-file nixpkgs) go test ./pkgs/sops-pgp-hook"
|
run: nix-shell --pure --run "NIX_PATH=nixpkgs=$(nix-instantiate --find-file nixpkgs) go test ./pkgs/sops-pgp-hook"
|
||||||
|
- name: Add keys group (needed for go tests)
|
||||||
|
run: sudo groupadd keys
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
- name: Run sops-install-secrets tests
|
||||||
|
run: nix-shell --pure --run "$(command -v sudo) unshare --mount --fork go test ./pkgs/sops-install-secrets"
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
Loading…
Add table
Reference in a new issue