Use GitHub OIDC for publishing. #39
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: {} | |
workflow_call: {} | |
jobs: | |
test: | |
strategy: | |
matrix: | |
py: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "pypy3.9" | |
- "pypy3.10" | |
pyramid_version: | |
- "<2" | |
- ">=2" | |
name: "Python: ${{ matrix.py }}, Pyramid: ${{ matrix.pyramid_version }}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.py }} | |
- name: Install | |
run: pip install .[testing] "pyramid${{ matrix.pyramid_version }}" | |
- name: Running tests | |
run: pytest tests | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install | |
run: pip install .[linting] | |
- name: Lint | |
run: ruff check pyramid_resource.py tests examples | |
- name: Format | |
run: ruff format --check pyramid_resource.py tests examples |