name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
read_msrv:
name: Read MSRV
uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@main
test:
needs: read_msrv
strategy:
fail-fast: false
matrix:
toolchain:
- { name: msrv, version: "${{ needs.read_msrv.outputs.msrv }}" }
- { name: stable, version: stable }
runs-on: ubuntu-latest
name: Test / ${{ matrix.toolchain.name }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Install Determinate Nix
uses: DeterminateSystems/determinate-nix-action@2a0be2498974c2b6327e19780488744384637d88 with:
extra-conf: lazy-trees = true
- name: Set up FlakeHub Cache
uses: DeterminateSystems/flakehub-cache-action@3be0931021788e3bb4df65f59a555039c2fa2d46
- name: Install Rust (${{ matrix.toolchain.name }})
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 with:
toolchain: ${{ matrix.toolchain.version }}
- name: Install cargo-nextest
uses: taiki-e/install-action@07b4745e0c39a41822af610387492e3e53aa222b with:
tool: cargo-nextest
- name: Enter Nix devshell
uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a
- name: Downgrade for MSRV
if: matrix.toolchain.name == 'msrv'
run: just downgrade-for-msrv
- name: Test
run: just test-no-coverage