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
51 changes: 43 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,56 @@ name: Rust

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

jobs:
build:
test:
strategy:
fail-fast: false
matrix:
rust: ['1.88.0', stable]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install toolchain
run: rustup toolchain install "${{ matrix.rust }}" --profile minimal
- name: Test offline behavior and compile examples
run: cargo +${{ matrix.rust }} test --locked
- name: Check example
run: cargo +${{ matrix.rust }} check --locked --examples

quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install formatting and lint tools
run: rustup toolchain install stable --profile minimal --component rustfmt,clippy
- run: cargo +stable fmt --all --check
- run: cargo +stable clippy --locked --all-targets -- -D warnings
- run: cargo +stable doc --locked --no-deps
env:
RUSTDOCFLAGS: -D warnings
- name: Verify standalone package
run: |
cargo +stable package --locked
package_dir=$(mktemp -d)
tar -xzf target/package/*.crate --strip-components=1 -C "$package_dir"
cd "$package_dir"
cargo +stable test --locked

mock-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v6
- run: rustup toolchain install stable --profile minimal
- name: Public mock only; no credentials
run: cargo +stable test --locked --test mock_integration -- --ignored --test-threads=1
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/target
Cargo.lock
Loading
Loading