Merge pull request #49 from codecov/joseph/compute-name #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly | |
components: clippy, rustfmt | |
- name: Lint | |
run: make lint | |
run_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
id: setup-python | |
with: | |
python-version: "3.11" | |
- name: Install Rust Toolchain | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Install requirements | |
run: | | |
python -m venv venv | |
. venv/bin/activate | |
pip install maturin | |
pip install -r tests/requirements.txt | |
maturin develop | |
- name: Install codecov cli | |
run: | | |
pip install --no-cache-dir git+https://github.com/codecov/codecov-cli.git@joseph/test-results-staging | |
- name: Run tests | |
run: | | |
. venv/bin/activate | |
python -m pytest --cov-report=xml:coverage.xml --cov=. --junitxml=unit.junit.xml | |
- name: Upload results to codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_ORG_TOKEN }} | |
url: ${{ secrets.CODECOV_URL }} | |
file: unit.junit.xml | |
disable_search: true | |
- name: Upload results to codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |
url: ${{ secrets.CODECOV_STAGING_API_URL }} | |
file: unit.junit.xml | |
disable_search: true |