Clean up ci #4
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: Python Tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: tests-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -eux {0} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
cache: 'pip' | |
cache-dependency-path: 'pyproject.toml' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip pre-commit | |
- name: Run linters | |
run: | | |
pre-commit run --hook-stage=manual --all-files | |
build: | |
# supercharge/mongodb-github-action requires containers so we don't test other platforms | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
python-version: ["3.8", "3.11", "pypy-3.9"] | |
fail-fast: false | |
name: CPython ${{ matrix.python-version }}-${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: 'pyproject.toml' | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install -e ".[test]" | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: 4.4 | |
- name: Run tests | |
run: | | |
pytest | |
docs: | |
name: Docs Checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
cache: 'pip' | |
cache-dependency-path: 'pyproject.toml' | |
# Build docs on lowest supported Python for furo | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install -e ".[docs]" | |
- name: Build docs | |
run: | | |
cd docs | |
make html |