name: Robrix CI
on:
push:
branches:
- main
paths:
- packaging/**
- resources/**
- src/**
- .github/**
- Cargo.lock
- Cargo.toml
- rust-toolchain.toml
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
paths:
- packaging/**
- resources/**
- src/**
- .github/**
- Cargo.lock
- Cargo.toml
- rust-toolchain.toml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0" RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
jobs:
clippy:
if: github.event.pull_request.draft == false
name: clippy
runs-on: macos-14 steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-on-failure: "true"
- run: cargo clippy --workspace --all-features
typos:
if: github.event.pull_request.draft == false
name: typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for typos
uses: crate-ci/typos@master