Update workflows. #146
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: Test | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- master | |
paths: | |
- 'generate_changelog/*' | |
- 'test/*' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'generate_changelog/*' | |
- 'test/*' | |
# Also trigger on page_build, as well as release created events | |
page_build: | |
release: | |
types: # Does not affect page_build above. | |
- created | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: uv sync --all-extras --all-groups --dev | |
- name: Test with pytest | |
run: uv run pytest | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 |