Skip to content

Commit 7aa2101

Browse files
authored
Revert "ci: run coverage jobs in pull_request_target context (#4483)" (#4485)
This reverts commit 44c16ec.
1 parent ff1b5c4 commit 7aa2101

File tree

2 files changed

+41
-54
lines changed

2 files changed

+41
-54
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,46 @@ jobs:
385385
components: rust-src
386386
- run: cargo rustdoc --lib --no-default-features --features full -Zunstable-options --config "build.rustdocflags=[\"--cfg\", \"docsrs\"]"
387387

388+
coverage:
389+
needs: [fmt]
390+
name: coverage ${{ matrix.os }}
391+
strategy:
392+
matrix:
393+
os: ["windows-latest", "macos-14", "ubuntu-latest"] # first available arm macos runner
394+
runs-on: ${{ matrix.os }}
395+
steps:
396+
- if: ${{ github.event_name == 'pull_request' && matrix.os != 'ubuntu-latest' }}
397+
id: should-skip
398+
shell: bash
399+
run: echo 'skip=true' >> $GITHUB_OUTPUT
400+
- uses: actions/checkout@v4
401+
if: steps.should-skip.outputs.skip != 'true'
402+
- uses: actions/setup-python@v5
403+
if: steps.should-skip.outputs.skip != 'true'
404+
with:
405+
python-version: '3.12'
406+
- uses: Swatinem/rust-cache@v2
407+
if: steps.should-skip.outputs.skip != 'true'
408+
with:
409+
save-if: ${{ github.event_name != 'merge_group' }}
410+
- uses: dtolnay/rust-toolchain@stable
411+
if: steps.should-skip.outputs.skip != 'true'
412+
with:
413+
components: llvm-tools-preview,rust-src
414+
- name: Install cargo-llvm-cov
415+
if: steps.should-skip.outputs.skip != 'true'
416+
uses: taiki-e/install-action@cargo-llvm-cov
417+
- run: python -m pip install --upgrade pip && pip install nox
418+
if: steps.should-skip.outputs.skip != 'true'
419+
- run: nox -s coverage
420+
if: steps.should-skip.outputs.skip != 'true'
421+
- uses: codecov/codecov-action@v4
422+
if: steps.should-skip.outputs.skip != 'true'
423+
with:
424+
file: coverage.json
425+
name: ${{ matrix.os }}
426+
token: ${{ secrets.CODECOV_TOKEN }}
427+
388428
emscripten:
389429
name: emscripten
390430
if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
@@ -633,6 +673,7 @@ jobs:
633673
- valgrind
634674
- careful
635675
- docsrs
676+
- coverage
636677
- emscripten
637678
- test-debug
638679
- test-free-threaded

.github/workflows/coverage.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)