Skip to content

infra(ci): correctly use Coveralls parallel builds #273

infra(ci): correctly use Coveralls parallel builds

infra(ci): correctly use Coveralls parallel builds #273

Workflow file for this run

name: Python CI
on:
push: {}
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- python-version: "pypy-3.9"
os: ubuntu-latest
- python-version: "pypy-3.10"
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
uv sync --group dev
- name: Run test suite
run: |
uv run py.test -v --cov=tinydb
- name: Perform type check
run: |
uv run pytest --mypy -m mypy tinydb tests
if: ${{ contains(matrix.python-version, '3.14') }}
- name: Verify dist package format
run: |
uv build
uv run --with twine twine check dist/*
if: ${{ contains(matrix.python-version, '3.14') }}
- name: Upload coverage result
if: ${{ matrix.os != 'windows-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.os }}-py${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
uv run coveralls
coveralls:
name: Indicate completion to coveralls.io
needs: build
runs-on: ubuntu-latest
steps:
- name: Install coveralls
run: pip3 install --upgrade coveralls
- name: Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --finish