Skip to content

CI

CI #25

Workflow file for this run

name: CI
on:
create:
tags:
jobs:
code_quality:
name: Check code quality
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
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
pip install --no-cache-dir -e .
pip install --no-cache-dir -r requirements/linters.txt
pip install --no-cache-dir -r requirements/tests.txt
- name: Lint
run: |
make lint
- name: Test
run: |
make test
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
deploy:
name: Publish
runs-on: ubuntu-latest
needs: code_quality
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload --verbose dist/*