Skip to content

reduce test CI workflow run time #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
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
33 changes: 33 additions & 0 deletions .github/workflows/run-dev-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,32 @@ jobs:
path: ~/.cargo
key: ${{ runner.os }}-test-cargo-${{ hashFiles('Cargo.lock') }}
- run: cargo fetch
- run: rustup component add llvm-tools-preview
- name: Install third-party binaries
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest,cargo-llvm-cov,cargo-binstall,just
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install workflow deps
run: python3 -m pip install meson
- name: Install ninja (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install ninja-build
- name: Install ninja (Windows)
if: runner.os == 'Windows'
run: choco install ninja
- run: just test
# continue-on-error: true
- name: Tar build assets
run: tar -cvf llvm-cov-assets.tar target/llvm-cov-target
- name: save build as artifact
uses: actions/upload-artifact@v4
with:
path: llvm-cov-assets.tar
name: cpp-linter-lib_tests-${{ runner.os }}-${{ github.run_id }}
retention-days: 1

test:
needs: [cache-deps]
Expand Down Expand Up @@ -113,6 +139,13 @@ jobs:
path: ~/.cargo
key: ${{ runner.os }}-test-cargo-${{ hashFiles('Cargo.lock') }}

- name: restore build from artifact
uses: actions/download-artifact@v4
with:
name: cpp-linter-lib_tests-${{ runner.os }}-${{ github.run_id }}
- name: Un-Tar build assets
run: tar -xvf llvm-cov-assets.tar

- name: Collect Coverage
working-directory: cpp-linter-lib
env:
Expand Down
Loading