Skip to content

release v0.2.0

release v0.2.0 #19

Workflow file for this run

name: test
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Hatch
uses: pypa/hatch@install
- name: Run static analysis
run: hatch fmt --check
- name: Check types
run: hatch run types:check
- name: Run tests
run: hatch test --python ${{ matrix.python-version }} --cover-quiet --randomize
- name: Create coverage report
run: hatch run hatch-test.py${{ matrix.python-version }}:coverage xml
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}-${{ matrix.python-version }}
path: coverage.xml
coverage:
name: Upload coverage
needs:
- run
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Download coverage data
uses: actions/download-artifact@v4
with:
pattern: coverage-*
path: coverage_data
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
directory: coverage_data
use_oidc: true
check:
if: always()
needs:
- run
- coverage
runs-on: ubuntu-latest
steps:
- name: Verify dependent success
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}