Skip to content

CI

CI #446

name: CI
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- master
schedule:
- cron: '30 7 * * *'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 2
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10', '3.13', '3.14']
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 tox
- name: Test with tox
run: |
tox -e py$(echo ${{ matrix.python-version }} | tr -d .)-tests
- name: Test cli
run: |
tox -e py$(echo ${{ matrix.python-version }} | tr -d .)-cli
- name: Check style
if: ${{ matrix.python-version == '3.13' }}
run: |
tox -e py313-lint
tox -e copying
- name: Upload coverage to Codecov
if: ${{ matrix.python-version == '3.13' }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Check package
if: ${{ matrix.python-version == '3.13' }}
run: tox -e py313-checksetup
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: >-
matrix.python-version == '3.13' &&
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags')
with:
password: ${{ secrets.test_pypi_password }}
repository-url: https://test.pypi.org/legacy/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: >-
matrix.python-version == '3.13' &&
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags')
with:
password: ${{ secrets.pypi_password }}