colmena/.github/workflows/tests.yml
Zhaofeng Li e5c30066c2 Revert ".github: Run workflows on push event only"
Sadly it breaks CI in fork-originated PRs if the author doesn't enable
Actions on the fork itself.

This reverts commit ce1aa41ff4.
2024-11-08 11:27:40 -07:00

32 lines
835 B
YAML

name: Tests
on:
pull_request:
push:
jobs:
tests:
strategy:
matrix:
os:
- label: Linux
image: ubuntu-latest
name: ${{ matrix.os.label }}
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a # v15
- name: Enable Binary Cache
uses: cachix/cachix-action@v15
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"