Skip to content

Commit 4460a95

Browse files
committed
reduce test CI workflow run time
This involves saving a build per OS that can be as large as 2GB.
1 parent 215485c commit 4460a95

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/run-dev-tests.yml

+19
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ jobs:
3737
path: ~/.cargo
3838
key: ${{ runner.os }}-test-cargo-${{ hashFiles('Cargo.lock') }}
3939
- run: cargo fetch
40+
- run: rustup component add llvm-tools-preview
41+
- name: Install third-party binaries
42+
uses: taiki-e/install-action@v2
43+
with:
44+
tool: cargo-nextest,cargo-llvm-cov,cargo-binstall,just
45+
- run: just test
46+
continue-on-error: true
47+
- name: save build as artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
path: target/llvm-cov-target
51+
name: cpp-linter-lib_tests-${{ runner.os }}-${{ github.run_id }}
52+
retention-days: 1
4053

4154
test:
4255
needs: [cache-deps]
@@ -113,6 +126,12 @@ jobs:
113126
path: ~/.cargo
114127
key: ${{ runner.os }}-test-cargo-${{ hashFiles('Cargo.lock') }}
115128

129+
- name: restore build from artifact
130+
uses: actions/download-artifact@v4
131+
with:
132+
path: target/llvm-cov-target
133+
name: cpp-linter-lib_tests-${{ runner.os }}-${{ github.run_id }}
134+
116135
- name: Collect Coverage
117136
working-directory: cpp-linter-lib
118137
env:

0 commit comments

Comments
 (0)