Skip to content

Merge pull request #17 from louis-richard/devel #70

Merge pull request #17 from louis-richard/devel

Merge pull request #17 from louis-richard/devel #70

Workflow file for this run

name: CI
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12']
os: [ macos-latest, windows-2019, ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
pip install -r requirements.txt
pip install keyrings.alt
- name: Lint with flake8
run: |
flake8 $(git ls-files '*.py')
- name: Test with pytest
run: |
pip install pytest ddt pytest-cov sphinx pandoc
pip install -r docs/requirements.txt
pip install keyrings.alt
pytest
- name: Test with pytest (coverage + long tests)
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
run: |
sudo apt update && sudo apt install -y texlive pandoc
pip install pytest ddt pytest-cov sphinx pandoc
pip install -r docs/requirements.txt
pip install keyrings.alt
pytest --cov=./ --cov-report=xml
- name: Check that release process is not broken
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }}
run: |
pip install build wheel twine
python -m build .
twine check dist/*
twine upload --repository testpypi --skip-existing dist/*
- name: Upload coverage reports to Codecov
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests