style(demo): make demo colors better #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: check formatting | |
run: cargo fmt -- --check | |
- name: Cache Cargo dependencies | |
uses: Swatinem/rust-cache@v2 | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Run clippy action | |
uses: clechasseur/rs-clippy-check@v3 | |
- name: Cache Cargo dependencies | |
uses: Swatinem/rust-cache@v2 | |
doc: | |
name: doc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust nightly | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Run cargo doc | |
run: cargo doc --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: --cfg docsrs | |
test: | |
runs-on: ${{ matrix.os }} | |
name: test ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: cargo generate-lockfile | |
if: hashFiles('Cargo.lock') == '' | |
run: cargo generate-lockfile | |
- name: cargo test --locked | |
run: cargo test --locked --all-features --all-targets | |
- name: cargo test --doc | |
run: cargo test --doc --all-features | |
- name: Cache Cargo dependencies | |
uses: Swatinem/rust-cache@v2 |