Skip to content
Merged
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
32 changes: 22 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,20 @@ jobs:

- name: Install Rust toolchain
if: steps.crates.outputs.exists == 'true'
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
rustflags: ""
cache-shared-key: linux-quality
cache-save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Restore Rust cache
if: steps.crates.outputs.exists == 'true'
uses: Swatinem/rust-cache@v2
with:
shared-key: linux-quality
cache-targets: true
cache-all-crates: false
cache-workspace-crates: false
cache-bin: false
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-on-failure: false

- name: Check formatting
Expand All @@ -55,11 +62,11 @@ jobs:

- name: Run Clippy
if: steps.crates.outputs.exists == 'true'
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --locked --workspace --all-targets --all-features -- -D warnings

- name: Run tests
if: steps.crates.outputs.exists == 'true'
run: cargo test --workspace --all-targets --all-features
run: cargo test --locked --workspace --all-targets --all-features

- name: Note docs-only branch
if: steps.crates.outputs.exists == 'false'
Expand All @@ -80,15 +87,20 @@ jobs:
uses: actions/checkout@v7

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
rustflags: ""
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: macro-runtime-${{ runner.os }}
cache-targets: false
cache-all-crates: false
cache-workspace-crates: false
cache-bin: false
cache-save-if: ${{ github.ref == 'refs/heads/main' }}
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-on-failure: false

- name: Run opy-macro-js tests
run: cargo test -p opy-macro-js --all-targets
run: cargo test --locked -p opy-macro-js --all-targets