Skip to content

Commit cca6c0e

Browse files
Merge pull request #1 from Michael-J-Ward/update-codecov
update Workflow Actions, badge URLs, and codecov token
2 parents 53551d2 + 9a6aa33 commit cca6c0e

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

.github/workflows/CI.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,16 @@ jobs:
1212
os: ["ubuntu"]
1313
runs-on: ${{ matrix.os }}-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-python@v2
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.10"
1919
cache: "pip"
20-
- uses: actions-rs/toolchain@v1
21-
with:
22-
toolchain: stable
23-
override: true
24-
profile: minimal
25-
components: llvm-tools-preview
20+
- name: Rust setup
21+
run: rustup toolchain install stable --profile minimal
2622
- name: Install cargo-llvm-cov
2723
uses: taiki-e/install-action@cargo-llvm-cov
28-
- uses: Swatinem/rust-cache@v1
24+
- uses: Swatinem/rust-cache@v2
2925
with:
3026
key: coverage-cargo-${{ matrix.os }}
3127
continue-on-error: true
@@ -45,7 +41,10 @@ jobs:
4541
maturin develop
4642
pytest tests --cov=foobar --cov-report lcov:python-coverage.lcov
4743
cargo llvm-cov report --lcov --output-path rust-coverage.lcov
48-
- uses: codecov/codecov-action@v3
44+
- name: Upload results to Codecov
45+
uses: codecov/codecov-action@v4
4946
with:
5047
files: python-coverage.lcov,rust-coverage.lcov
5148
name: ${{ matrix.os }}
49+
token: ${{ secrets.CODECOV_TOKEN }}
50+

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# rust-python-coverage
1818
Example PyO3 project with automated test coverage for Rust and Python
1919

20-
[![CI](https://github.com/cjermain/rust-python-coverage/actions/workflows/CI.yml/badge.svg)](https://github.com/cjermain/rust-python-coverage/actions/workflows/CI.yml)
21-
[![codecov](https://codecov.io/gh/cjermain/rust-python-coverage/branch/main/graph/badge.svg?token=NWHDJ22L8I)](https://codecov.io/gh/cjermain/rust-python-coverage)
20+
[![CI](https://github.com/Michael-J-Ward/rust-python-coverage/actions/workflows/CI.yml/badge.svg)](https://github.com/Michael-J-Ward/rust-python-coverage/actions/workflows/CI.yml)
21+
[![codecov](https://codecov.io/github/Michael-J-Ward/rust-python-coverage/graph/badge.svg?token=K4T59SGTQX)](https://codecov.io/github/Michael-J-Ward/rust-python-coverage)
2222

2323
This repository shows how to set up a continuous-integration job for measuring
2424
coverage over a project using [PyO3](https://github.com/PyO3/pyo3). Based on
@@ -129,8 +129,7 @@ The last step of this process happens in the CI, where we upload both coverage
129129
files to CodeCov. [Merging reports](https://docs.codecov.com/docs/merging-reports)
130130
is an automatic feature of CodeCov, so the final view shows the combined view.
131131
132-
https://codecov.io/gh/cjermain/rust-python-coverage
133-
132+
https://codecov.io/github/Michael-J-Ward/rust-python-coverage
134133
135134
## Appendix
136135

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
use pyo3::prelude::*;
32

43
/// Returns the sum of two numbers (only Rust)

0 commit comments

Comments
 (0)