Skip to content

Commit

Permalink
Bring the CI config to 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
fbernier committed Nov 7, 2024
1 parent f79fa49 commit ff52e36
Showing 1 changed file with 62 additions and 40 deletions.
102 changes: 62 additions & 40 deletions .github/workflows/base62.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,86 @@
on: [push, pull_request]

name: ci

on:
push:
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run cargo check
run: cargo check --all-targets --all-features

test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
include:
- os: ubuntu-latest
rust: nightly
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
toolchain: ${{ matrix.rust }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-targets --all-features
- name: Run doc tests
run: cargo test --doc

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
command: fmt
args: --all -- --check
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
command: clippy
args: -- -D warnings
components: clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy --all-targets --all-features

docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Check documentation
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps --document-private-items

0 comments on commit ff52e36

Please sign in to comment.