Skip to content
Open
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
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,21 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4

- name: Cache cargo registry and index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Run tests
run: cargo test --verbose --all-features

- name: Verify working directory is clean
run: git diff --exit-code

Expand All @@ -27,13 +40,29 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
id: toolchain

- run: rustup override set ${{steps.toolchain.outputs.name}}

- name: Cache cargo registry and index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-latest-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-latest-

- name: Remove lockfile to build with latest dependencies
run: rm Cargo.lock

- name: Run tests
run: cargo test --verbose --all-features

- name: Verify working directory is clean (excluding lockfile)
run: git diff --exit-code ':!Cargo.lock'

Expand Down