update bioregistry on 2024-07-20 #583
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: Tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
pytest: | |
name: pytest | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 4 | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macOS-latest | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
pandoc-version: | |
- "2.9.2" | |
- "2.11.3.1" | |
exclude: | |
# exclude due to https://github.com/r-lib/actions/issues/206 | |
- os: windows-latest | |
pandoc-version: "2.11.3.1" | |
# reduce non-essential builds | |
- python-version: "3.8" | |
pandoc-version: "2.9.2" | |
include: | |
- pandoc-version: "2.9.2" | |
panflute-version: "1.12.5" | |
- pandoc-version: "2.11.3.1" | |
panflute-version: "2.0.5" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
# pandoc-versions from 2.7.3 to 2.9.1 won't install on Windows | |
# https://github.com/jgm/pandoc/issues/6071 | |
pandoc-version: ${{ matrix.pandoc-version }} | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[webpage,dev]" panflute==${{ matrix.panflute-version }} | |
- name: Test with pytest | |
env: | |
LANG: en_US.UTF-8 # https://github.com/jgm/citeproc/issues/26 | |
GITHUB_PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} | |
run: pytest | |
pre-commit: | |
name: Pre-Commit Checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' # should match default_language_version in .pre-commit-config.yaml | |
- name: Run checks | |
uses: pre-commit/[email protected] | |
docs: | |
name: Build Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install ".[webpage,dev]" | |
- name: Build docs | |
run: | | |
# temporary workaround for portray "Module not found" error https://git.io/JeR9C | |
export PYTHONPATH=. | |
portray as_html --overwrite --output_dir=docs | |
- name: Deploy docs | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && !github.event.repository.fork | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs | |
publish_branch: gh-pages |