make ci opt-in #80
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Quick CI | |
# A short version of the CI, designed to run in seconds (<200s) on every push. | |
# Runs lints & basic tests on branches named ci/... | |
on: | |
push: | |
branches: | |
- ci/* | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- run: python -m pip install --upgrade pip && pip install nox | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Check python formatting and lints (ruff) | |
run: nox -s ruff | |
- name: Check rust formatting (rustfmt) | |
run: nox -s rustfmt | |
semver-checks: | |
if: github.ref != 'refs/heads/main' | |
needs: [fmt] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: obi1kenobi/cargo-semver-checks-action@v2 | |
clippy: | |
needs: [fmt] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy,rust-src | |
- uses: actions/setup-python@v5 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.event_name != 'merge_group' }} | |
- run: python -m pip install --upgrade pip && pip install nox | |
- run: nox -s clippy | |
tests: | |
name: test rust skip-full | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.event_name != 'merge_group' }} | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rust-src | |
- run: python -m pip install --upgrade pip && pip install nox | |
- run: nox -s test-rust -- skip-full | |
check-guide: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Setup mdBook & lychee | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: mdbook,lychee | |
- name: Check the docs & links | |
run: | | |
python -m pip install --upgrade pip && pip install nox | |
nox -s check-guide |