Skip to content

BUG: use codecov token stored to github repository secrets #368

BUG: use codecov token stored to github repository secrets

BUG: use codecov token stored to github repository secrets #368

Workflow file for this run

name: generate coverage and upload to Codecov
on:
push:
# branches-ignore:
# - '**'
branches:
- "main"
- "dev"
pull_request:
# branches-ignore:
# - '**'
branches:
- "main"
- "dev"
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Install dependencies
run: |
which python
python --version
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
- name: Install package
run: |
python setup.py build_ext -i
python setup.py develop
- name: Report environment information
run: |
which python
python --version
python -c "import sys; print(f'Python {sys.version}')"
python -c "import pip; print(f'pip {pip.__version__}')"
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')"
python -m pip freeze
- name: Convert notebooks
run: |
python ./scripts/convert_notebook_tests.py
- name: Run tests and generate coverage report
run: |
pytest -v --cov=./ --cov-report term --cov-report=xml --color=yes
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }} # required
env_vars: OS,PYTHON
fail_ci_if_error: true
verbose: true