Bump codecov/codecov-action from 4 to 5 #62
Workflow file for this run
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
name: Tests | |
on: [push, workflow_dispatch] | |
jobs: | |
Test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: | | |
3.10 | |
3.11 | |
3.12 | |
- name: Install Hatch | |
run: python -m pip install hatch | |
- name: Perform release check | |
run: hatch run lint:release | |
- name: Run tests | |
run: hatch run test:cov --verbose | |
- name: Generate report | |
run: hatch env run -e test.py3.12 coverage xml | |
- name: Upload coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
flags: ${{ runner.os }} | |
verbose: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Build wheel | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
run: hatch build | |
- name: Publish package | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
verbose: true | |
skip_existing: true |