Skip to content

Commit 7fe7cc8

Browse files
committed
chore: Fix cache issue on macos runner
1 parent b98906e commit 7fe7cc8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
- uses: actions/setup-node@v2
3636
- name: Cache dependencies
3737
uses: actions/cache@v3
38-
env:
39-
cache-name: cache-dependencies
4038
with:
4139
path: |
4240
~/.cargo/.crates.toml
@@ -45,13 +43,13 @@ jobs:
4543
~/.cargo/registry/index
4644
~/.cargo/registry/cache
4745
target
48-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
49-
# Pre-install wasm-bindgen-cli on macOS to avoid race condition
50-
- name: Pre-install wasm-bindgen-cli (macOS)
46+
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }}
47+
- name: Pre-install wasm-bindgen-cli to test cache (macOS)
5148
if: matrix.os == 'macos-latest'
5249
run: |
53-
mkdir -p target/test_cache/.wasm-bindgen-cargo-install-0.2.100
54-
cargo install wasm-bindgen-cli --version 0.2.100 --root target/test_cache/.wasm-bindgen-cargo-install-0.2.100 --force
50+
cargo install wasm-bindgen-cli --version 0.2.100 \
51+
--root target/test_cache/.wasm-bindgen-cargo-install-0.2.100 \
52+
--locked --force
5553
- name: Run Tests
5654
run: cargo test --all --locked
5755
env:

0 commit comments

Comments
 (0)