|
12 | 12 | steps: |
13 | 13 | - uses: actions/checkout@v6 |
14 | 14 | - uses: dtolnay/rust-toolchain@stable |
| 15 | + - uses: Swatinem/rust-cache@v2 |
| 16 | + with: |
| 17 | + save-if: ${{ github.ref == 'refs/heads/main' }} |
15 | 18 | - run: cargo check --workspace --all-features --all-targets |
16 | 19 |
|
17 | 20 | check-docs: |
|
30 | 33 | steps: |
31 | 34 | - uses: actions/checkout@v6 |
32 | 35 | - uses: dtolnay/rust-toolchain@stable |
| 36 | + - uses: Swatinem/rust-cache@v2 |
| 37 | + with: |
| 38 | + save-if: ${{ github.ref == 'refs/heads/main' }} |
33 | 39 | - uses: taiki-e/install-action@cargo-hack |
34 | 40 | - name: cargo hack check |
35 | 41 | working-directory: ${{ matrix.subcrate }} |
|
49 | 55 | - uses: dtolnay/rust-toolchain@master |
50 | 56 | with: |
51 | 57 | toolchain: ${{ matrix.rust }} |
| 58 | + - uses: Swatinem/rust-cache@v2 |
| 59 | + if: matrix.rust != 'nightly' |
| 60 | + with: |
| 61 | + save-if: ${{ github.ref == 'refs/heads/main' }} |
52 | 62 | - run: cargo test --workspace --all-features |
53 | 63 |
|
54 | 64 | test-msrv: |
|
67 | 77 | - run: cargo update -p async-compression --precise 0.4.23 |
68 | 78 | - run: cargo update -p flate2 --precise 1.0.35 |
69 | 79 | - uses: dtolnay/rust-toolchain@1.64 |
| 80 | + - uses: Swatinem/rust-cache@v2 |
| 81 | + with: |
| 82 | + save-if: ${{ github.ref == 'refs/heads/main' }} |
70 | 83 | - run: cargo check -p tower-http --all-features |
71 | 84 |
|
72 | 85 | style: |
@@ -107,5 +120,7 @@ jobs: |
107 | 120 | with: |
108 | 121 | tool: cargo-check-external-types@0.4.0 |
109 | 122 | - uses: Swatinem/rust-cache@v2 |
| 123 | + with: |
| 124 | + save-if: ${{ github.ref == 'refs/heads/main' }} |
110 | 125 | - run: cargo check-external-types --all-features |
111 | 126 | working-directory: tower-http |
0 commit comments