42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: Tests
|
|
on:
|
|
pull_request:
|
|
push:
|
|
jobs:
|
|
tests:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- label: Linux
|
|
image: ubuntu-latest
|
|
nix:
|
|
- version: 2.3.16
|
|
url: https://releases.nixos.org/nix/nix-2.3.16/install
|
|
- version: 2.4
|
|
url: https://releases.nixos.org/nix/nix-2.4/install
|
|
- version: 2.10.3
|
|
url: https://releases.nixos.org/nix/nix-2.10.3/install
|
|
|
|
name: ${{ matrix.os.label }} + Nix ${{ matrix.nix.version }}
|
|
runs-on: ${{ matrix.os.image }}
|
|
steps:
|
|
- uses: actions/checkout@v2.3.5
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
with:
|
|
install_url: ${{ matrix.nix.url }}
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
|
|
- uses: cachix/cachix-action@v10
|
|
with:
|
|
name: colmena
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
- name: Set up pinned nixpkgs
|
|
run: echo "NIX_PATH=nixpkgs=$(nix-instantiate --eval flake-compat.nix -A defaultNix.inputs.nixpkgs.outPath | sed 's|\"||g')" >> $GITHUB_ENV
|
|
|
|
- run: nix-shell --run "cargo test"
|
|
if: ${{ !contains(matrix.nix.version, '2.3') }}
|
|
- run: nix-shell --run "cargo test -- --skip flake"
|
|
if: ${{ contains(matrix.nix.version, '2.3') }}
|