mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-22 16:40:51 +00:00
74ef8ad2cf
enable flakes & nix-command features by default
111 lines
3.1 KiB
YAML
111 lines
3.1 KiB
YAML
name: "install-nix-action test"
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
simple-build:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2.4.0
|
|
- 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.4.0
|
|
- 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.4.0
|
|
- 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
|
|
|
|
flakes:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2.4.0
|
|
- run: yarn install --frozen-lockfile
|
|
- run: yarn build
|
|
- name: Install Nix
|
|
uses: ./
|
|
with:
|
|
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
|
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
|
extra_nix_config: |
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
- run: nix flake show github:NixOS/nixpkgs
|
|
|
|
installer-options:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2.4.0
|
|
- run: yarn install --frozen-lockfile
|
|
- run: yarn build
|
|
- name: Install Nix
|
|
uses: ./
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-21.05
|
|
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
|
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
|
- run: nix-build test.nix
|
|
|
|
oldest-supported-installer:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2.3.5
|
|
- run: yarn install --frozen-lockfile
|
|
- run: yarn build
|
|
- name: Install Nix
|
|
uses: ./
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-21.05
|
|
install_url: https://releases.nixos.org/nix/nix-2.3.5/install
|
|
- run: nix-build test.nix
|