Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 36 additions & 33 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,42 @@ on:
branches: [master]

jobs:
# Use MSRV for the build job
build:
runs-on: ubuntu-latest
name: Build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.56
- run: cargo build

# Use stable for other jobs
test:
name: Run tests
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- run: cargo test

check-fmt:
name: Check formatting
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt -- --check

clippy:
name: Catch common mistakes
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
# Use MSRV for the build job
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.56
default: true
profile: minimal
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
# Use stable for other jobs
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal
components: rustfmt, clippy
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Catch common mistakes
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-targets -- -D warnings