name: ci
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
verify:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: install JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- name: cargo check
run: cargo check --locked --all-targets
- name: cargo clippy
run: cargo clippy --all-targets --locked -- -D warnings
- name: cargo test
run: cargo test --locked --all-targets
- name: cargo build
run: cargo build --locked
- name: cargo test --ignored (network canaries, master only)
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: cargo test --locked --all-targets -- --ignored