Skip to content
Merged
Show file tree
Hide file tree
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: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: ci

on:
push:
branches: [master]
pull_request:
branches: [master]

# Cancel superseded runs on the same ref to save CI minutes
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check

clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy --all-features --all-targets -- -D warnings

test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features

doc:
name: cargo doc
runs-on: ubuntu-latest
env:
# Fail the build on any rustdoc warning
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Build documentation
run: cargo doc --all-features --no-deps
30 changes: 0 additions & 30 deletions .github/workflows/clippy.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/doc.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/fmt.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/test.yml

This file was deleted.

Loading