2022-08-17 04:15:43 +02:00
|
|
|
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
|
2022-09-19 01:47:09 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-08-17 04:15:43 +02:00
|
|
|
|
|
|
|
- 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') }}
|