feat: starlette extension #32
Workflow file for this run
This file contains hidden or 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: | |
branches-ignore: | |
- "dependabot/**" | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Run format checks | |
run: | | |
pip install uv nox | |
nox -s format_check | |
type-check: | |
name: Type-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Run pyright | |
run: | | |
pip install uv nox | |
nox -s typecheck | |
- name: Verify type-completeness | |
run: | | |
uv pip install --group typecheck | |
pyright --verifytypes linkd --ignoreexternal | |
slotscheck: | |
name: Slotscheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Run slotscheck | |
run: | | |
pip install uv nox | |
nox -s slotscheck | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run pytest | |
run: | | |
pip install uv | |
uv pip install --group test | |
pytest --cov linkd --cov-report=xml --junitxml=junit.xml tests | |
- name: Upload coverage to CodeCov | |
if: ${{ !cancelled() && matrix.python-version == '3.10' }} | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() && matrix.python-version == '3.10' }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |