Skip to content

Add a docs build stage to the tests workflow #59

Add a docs build stage to the tests workflow

Add a docs build stage to the tests workflow #59

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
testing:
runs-on: ubuntu-latest
name: Testing
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
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
run: |
python -m pip install hatch
- name: Run pytest
run: |
hatch build --hooks-only
hatch run +py=${{ matrix.python-version }} testing:test --cov=./ --cov-report=xml
- name: Coverage report
uses: codecov/codecov-action@v1
docs:
runs-on: ubuntu-latest
name: Build Docs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install hatch
run: |
python -m pip install hatch
- name: Build
run: hatch run docs:mkdocs build