Skip to content

Bump version: 4.0.2 -> 4.0.3 #93

Bump version: 4.0.2 -> 4.0.3

Bump version: 4.0.2 -> 4.0.3 #93

Workflow file for this run

name: CI Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Cache tox environment
uses: actions/cache@v3
with:
path: .tox
key: 3.11-tox-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('tox.ini') }}
- name: Cache pre-commit environment
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: 3.11-pre-commit-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Lint and format with tox
run: tox -e lint
- name: If linting passes, upload any formatting changes
uses: EndBug/add-and-commit@v9
with:
message: "@auto Formatting"
test:
needs: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Cache tox environment
uses: actions/cache@v3
with:
path: .tox
key: ${{ matrix.python-version }}-tox-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('tox.ini') }}
- name: Test with tox
run: tox
docs:
if: github.event_name != 'pull_request'
needs: test
runs-on: ubuntu-latest
concurrency: ci-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Cache tox environment
uses: actions/cache@v3
with:
path: .tox
key: 3.11-tox-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('tox.ini') }}
- name: Build documentation with tox
run: tox -e docs
- name: Add the the latest docs back to the repo if they've been updated
uses: EndBug/add-and-commit@v9
with:
pull: '--rebase --autostash'
message: "@auto Update docs"
- name: Deploy new docs if they've been updated
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: docs
folder: docs