mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-25 09:58:03 +00:00
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: "install-nix-action test"
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
simple-build:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-11.0]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: yarn install --frozen-lockfile
|
|
- run: yarn build
|
|
- name: Install Nix
|
|
uses: ./
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-20.03
|
|
- run: nix-env -iA cachix -f https://cachix.org/api/v1/install
|
|
- run: cat /etc/nix/nix.conf
|
|
# cachix should be available and be able to configure a cache
|
|
- run: cachix use cachix
|
|
- run: nix-build test.nix
|
|
|
|
custom-nix-path:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: yarn install --frozen-lockfile
|
|
- run: yarn build
|
|
- name: Install Nix
|
|
uses: ./
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-20.03
|
|
- run: test $NIX_PATH == "nixpkgs=channel:nixos-20.03"
|
|
- run: nix-build test.nix
|
|
|
|
extra-nix-config:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: yarn install --frozen-lockfile
|
|
- run: yarn build
|
|
- name: Install Nix
|
|
uses: ./
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-20.03
|
|
extra_nix_config: |
|
|
sandbox = relaxed
|
|
- run: cat /etc/nix/nix.conf
|
|
- run: nix-build test.nix --arg noChroot true
|