Skip to content

update Workflow Actions, badge URLs, and codecov token #1

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

Merged
merged 6 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
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
19 changes: 9 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,16 @@ jobs:
os: ["ubuntu"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: llvm-tools-preview
- name: Rust setup
run: rustup toolchain install stable --profile minimal
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
key: coverage-cargo-${{ matrix.os }}
continue-on-error: true
Expand All @@ -45,7 +41,10 @@ jobs:
maturin develop
pytest tests --cov=foobar --cov-report lcov:python-coverage.lcov
cargo llvm-cov report --lcov --output-path rust-coverage.lcov
- uses: codecov/codecov-action@v3
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
files: python-coverage.lcov,rust-coverage.lcov
name: ${{ matrix.os }}
token: ${{ secrets.CODECOV_TOKEN }}

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# rust-python-coverage
Example PyO3 project with automated test coverage for Rust and Python

[![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)
[![codecov](https://codecov.io/gh/cjermain/rust-python-coverage/branch/main/graph/badge.svg?token=NWHDJ22L8I)](https://codecov.io/gh/cjermain/rust-python-coverage)
[![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)
[![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)

This repository shows how to set up a continuous-integration job for measuring
coverage over a project using [PyO3](https://github.com/PyO3/pyo3). Based on
Expand Down Expand Up @@ -129,8 +129,7 @@ The last step of this process happens in the CI, where we upload both coverage
files to CodeCov. [Merging reports](https://docs.codecov.com/docs/merging-reports)
is an automatic feature of CodeCov, so the final view shows the combined view.

https://codecov.io/gh/cjermain/rust-python-coverage

https://codecov.io/github/Michael-J-Ward/rust-python-coverage

## Appendix

Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use pyo3::prelude::*;

/// Returns the sum of two numbers (only Rust)
Expand Down