name: "Run Tests"
on:
workflow_dispatch:
pull_request:
branches: ["main"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "src/**"
- "tests/**"
- ".github/workflows/test.yml"
push:
paths:
- "Cargo.toml"
- "Cargo.lock"
- "src/**"
- "tests/**"
- ".github/workflows/test.yml"
jobs:
treewide-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: |
eval "$(nix print-dev-env)"
set -x
# Run tests
cargo test | exit 1