Skip to content

migrate new python version #19

migrate new python version

migrate new python version #19

Workflow file for this run

name: Python package
on: [ push ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ "3.5","3.6", "3.7", "3.8", "3.9" ]
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install codecov
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install build
- name: Test with pytest
run: |
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage1.xml,./coverage2.xml
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}