This repository has been archived by the owner on May 31, 2024. It is now read-only.
Update README.md #126
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: Run tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install pre-commit | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U setuptools wheel | |
pip install .[dev] | |
- name: Run pre-commit | |
run: | | |
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | |
pytest: | |
name: Run tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
max-parallel: 3 | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[test,formats] | |
- name: Run tests with pytest | |
run: | | |
pytest -rs -vvv --durations=0 | |
docs: | |
name: Test docs build | |
uses: ./.github/workflows/build-docs.yml | |
deploy_pages: | |
if: github.ref == 'refs/heads/main' | |
name: Deploy docs | |
needs: [docs] | |
uses: ./.github/workflows/deploy-pages.yml |