aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-02-25 16:08:43 +0100
committerGitHub <noreply@github.com>2021-02-25 16:08:43 +0100
commitc189031e8be0530d73a817571ad7f81ad5eedce6 (patch)
tree1375d1f24bad36195caef97a15a5aee4728f2433 /.github/workflows/test.yml
parent199081ad00e6ee4c704eaac34211b454fe0f310c (diff)
parent22aec8cef43e77bba356d099868fe0a6e7545b43 (diff)
Merge pull request #4549 from NixOS/installer-artifact
Test macos/linux installer script for each push
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml44
1 files changed, 43 insertions, 1 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 021642f4c..bde6106e0 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -8,10 +8,52 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
+ env:
+ CACHIX_NAME: nix-ci
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v12
+ - uses: cachix/cachix-action@v8
+ with:
+ name: '${{ env.CACHIX_NAME }}'
+ signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
#- run: nix flake check
- run: nix-build -A checks.$(if [[ `uname` = Linux ]]; then echo x86_64-linux; else echo x86_64-darwin; fi)
+ installer:
+ if: github.event_name == 'push'
+ needs: tests
+ runs-on: ubuntu-latest
+ env:
+ CACHIX_NAME: nix-ci
+ outputs:
+ installerURL: ${{ steps.prepare-installer.outputs.installerURL }}
+ steps:
+ - uses: actions/checkout@v2.3.4
+ with:
+ fetch-depth: 0
+ - uses: cachix/install-nix-action@v12
+ - uses: cachix/cachix-action@v8
+ with:
+ name: '${{ env.CACHIX_NAME }}'
+ signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
+ - id: prepare-installer
+ run: scripts/prepare-installer-for-github-actions
+ installer_test:
+ if: github.event_name == 'push'
+ needs: installer
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest]
+ runs-on: ${{ matrix.os }}
+ env:
+ CACHIX_NAME: nix-ci
+ steps:
+ - uses: actions/checkout@v2.3.4
+ - uses: cachix/install-nix-action@master
+ with:
+ install_url: '${{needs.installer.outputs.installerURL}}'
+ install_options: '--tarball-url-prefix https://${{ env.CACHIX_NAME }}.cachix.org/serve'
+ - run: nix-instantiate -E 'builtins.currentTime' --eval
+ \ No newline at end of file