Skip to content

Set up code coverage workflow with CodeCov #20

Set up code coverage workflow with CodeCov

Set up code coverage workflow with CodeCov #20

Workflow file for this run

on:
push:
branches: main
pull_request:
branches: main
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip3 install pytest-cov || pip3 install --user pytest-cov;
- name: Install
run: |
pip3 debug --verbose .
pip3 install '.[dev]'
- name: pytest unit tests
run: |
pytest --cov=great_tables/ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}