Skip to content

Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11 #33

Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11

Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11 #33

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
STABLE_PYTHON_VERSION: 3.11
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, macos-latest ]
python-version: [ '3.10', '3.11' ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: pip install --upgrade hatch
- name: Run tests and track code coverage
run: hatch run cov
- name: Disambiguate coverage filename
run: mv .coverage ".coverage.${{ matrix.os }}.${{ matrix.python-version }}"
- name: Upload coverage data
uses: actions/upload-artifact@v3
with:
name: coverage-data
path: .coverage.*
run-container-matrix:
name: Container matrix on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.STABLE_PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.STABLE_PYTHON_VERSION }}
- name: Install Hatch
run: pip install --upgrade hatch hatch-containers
- name: Run tests in container matrix
run: hatch run all:test
coverage:
name: Report coverage
runs-on: ubuntu-latest
needs:
- run
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.STABLE_PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.STABLE_PYTHON_VERSION }}
- name: Install Hatch
run: pip install --upgrade hatch
- name: Download coverage data
uses: actions/download-artifact@v3
with:
name: coverage-data
- name: Make a coverage directory
run: mkdir coverage
- name: Combine coverage data
run: hatch run cov-report
- name: Generate coverage badge
run: hatch run cov-badge
- name: Upload coverage badge
uses: actions/upload-artifact@v3
with:
name: coverage-badge
path: coverage/coverage.svg
- name: Publish coverage report to gh-pages branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: coverage