Browse Source

👷 Run tests with Starlette from git

pull/14850/head
Sebastián Ramírez 5 months ago
parent
commit
66dbb7b284
  1. 10
      .github/workflows/test.yml

10
.github/workflows/test.yml

@ -51,6 +51,7 @@ jobs:
python-version: [ "3.14" ] python-version: [ "3.14" ]
uv-resolution: uv-resolution:
- highest - highest
starlette-src: [ true, false ]
include: include:
- os: ubuntu-latest - os: ubuntu-latest
python-version: "3.9" python-version: "3.9"
@ -78,11 +79,13 @@ jobs:
python-version: "3.14" python-version: "3.14"
coverage: coverage coverage: coverage
uv-resolution: highest uv-resolution: highest
starlette-src: true
fail-fast: false fail-fast: false
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
UV_PYTHON: ${{ matrix.python-version }} UV_PYTHON: ${{ matrix.python-version }}
UV_RESOLUTION: ${{ matrix.uv-resolution }} UV_RESOLUTION: ${{ matrix.uv-resolution }}
STARLETTE_SRC: ${{ matrix.starlette-src }}
steps: steps:
- name: Dump GitHub context - name: Dump GitHub context
env: env:
@ -102,10 +105,13 @@ jobs:
uv.lock uv.lock
- name: Install Dependencies - name: Install Dependencies
run: uv sync --no-dev --group tests --extra all run: uv sync --no-dev --group tests --extra all
- name: Install Starlette from source
if: matrix.starlette-src == 'true'
run: uv pip install --force-reinstall --no-deps --no-cache-dir --find-links https://test.pypi.org/simple/ starlette
- run: mkdir coverage - run: mkdir coverage
- name: Test - name: Test
if: matrix.codspeed != 'codspeed' if: matrix.codspeed != 'codspeed'
run: uv run bash scripts/test.sh run: uv run --no-sync bash scripts/test.sh
env: env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }} COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
@ -117,7 +123,7 @@ jobs:
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
with: with:
mode: simulation mode: simulation
run: uv run coverage run -m pytest tests/ --codspeed run: uv run --no-sync coverage run -m pytest tests/ --codspeed
# Do not store coverage for all possible combinations to avoid file size max errors in Smokeshow # Do not store coverage for all possible combinations to avoid file size max errors in Smokeshow
- name: Store coverage files - name: Store coverage files
if: matrix.coverage == 'coverage' if: matrix.coverage == 'coverage'

Loading…
Cancel
Save