ci: Recommendation is to use separate jobs for PyPI and TestPyPI #190
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
python-version: ['3.10', '3.11', '3.12', pypy-3.10] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: pyproject.toml | |
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 'pypy-3.10' | |
run: | | |
sudo apt update | |
sudo apt install libxml2-dev libxslt-dev | |
- run: pip install .[test] | |
# MyST-Parser 3+ requires Sphinx 6+ https://github.com/executablebooks/MyST-Parser/issues/612 | |
- run: coverage run --source=sphinxcontrib.opencontracting -m pytest -W error -W ignore::DeprecationWarning | |
- uses: coverallsapp/github-action@v2 |