Update documentation configuration #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- dev | |
tags: | |
- 'v*' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run linting | |
run: tox -e lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- version: '3.13' | |
toxenv: 'py313' | |
- version: '3.12' | |
toxenv: 'py312' | |
- version: '3.11' | |
toxenv: 'py311' | |
- version: '3.10' | |
toxenv: 'py310' | |
- version: '3.9' | |
toxenv: 'py39' | |
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 tox | |
run: python -m pip install tox | |
- name: Run checks | |
run: tox -e ${{ matrix.python.toxenv }} | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run type checks | |
run: tox -e typecheck | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Build docs | |
run: tox -e docs | |
publish: | |
needs: [lint, test, typecheck, docs] | |
if: startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install pypa/build | |
run: python -m pip install build | |
- name: Build distribution | |
run: python -m build --outdir dist/ | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Publish distribution to GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/apiron-*.whl | |
dist/apiron-*.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |