Update Python version badge #105
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: Upload coverage to Codecov | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install uv | |
run: | | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: Create and activate virtual environment | |
run: | | |
uv venv | |
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
uv pip install 'setuptools[pkg_resources]' | |
uv pip install -e ".[test]" | |
- name: Run tests with coverage | |
run: | | |
uv pip install pytest pytest-cov | |
pytest -s tests/ --cov=numerblox --cov-report term-missing --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./coverage.xml | |
fail_ci_if_error: false | |
verbose: true |