Skip to content

Commit

Permalink
Run CI on more platforms/channels (WilliamVenner#45)
Browse files Browse the repository at this point in the history
* Bundle existing CI jobs into one

* Run CI on more platforms

* Use `dtolnay/rust-toolchain` action

* Setup CI caching

* Run CI on stable and beta
  • Loading branch information
CosmicHorrorDev committed Dec 30, 2023
1 parent 7d03f1a commit 1643e44
Showing 1 changed file with 15 additions and 25 deletions.
40 changes: 15 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,28 @@ env:
CARGO_TERM_COLOR: always

jobs:
check:
runs-on: ${{ matrix.os }}
validation:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, beta]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Clippy
- name: Install ${{ matrix.toolchain }} toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- name: Setup cache
uses: Swatinem/rust-cache@v2
- name: Commune with clippy
run: cargo clippy --all -- -D warnings

fmt:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check formatting
run: cargo fmt --all -- --check

test:
needs: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check formatting
- name: Run test suite
run: cargo test

docs:
needs: fmt
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v3
- name: Check docs
env:
RUSTDOCFLAGS: -Dwarnings
run: cargo doc --all --no-deps

0 comments on commit 1643e44

Please sign in to comment.