Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Setup dependencies
python-version: ${{ matrix.python-version }}

- name: Set up environment
run: |
uv export --resolution ${{ matrix.resolution }} > requirements.txt
uv pip install --system --break-system-packages -r requirements.txt
uv python pin ${{ matrix.python-version }}
uv sync --resolution ${{ matrix.resolution }}

- name: Run pre-commit
if: matrix.pre-commit
Expand All @@ -51,14 +51,15 @@ jobs:
- name: Run pytest
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507 # v2.2.0
with:
custom-pytest: uv run --frozen pytest
custom-arguments: --cov --junitxml=junit.xml -o junit_family=legacy

- name: Run benchmarks
uses: CodSpeedHQ/action@513a19673a831f139e8717bf45ead67e47f00044 # v3.2.0
uses: CodSpeedHQ/action@63ae6025a0ffee97d7736a37c9192dbd6ed4e75f # v3.4.0
if: matrix.codspeed
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest --codspeed
run: uv run --frozen pytest --codspeed

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def test_matches_schema_store(self):
# TIP: go into debug mode to copy-and-paste into updated schema.json
assert local_schema_json == online_schema_json

@pytest.mark.skipif(
bool(os.getenv("CI")),
reason=".python-version re-pinned in CI for test matrix",
)
def test_target_python_version(self):
# If this test fails, we should bump the version in the command in schema.py
assert Path(".python-version").read_text().startswith("3.10")
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def test_matches_schema_store(self):
# Compare the JSON
assert local_schema_json == online_schema_json.replace("\r\n", "\n\n")

@pytest.mark.skipif(
bool(os.getenv("CI")),
reason=".python-version re-pinned in CI for test matrix",
)
def test_target_python_version(self):
# If this test fails, we should bump the version in the command in schema.py
assert Path(".python-version").read_text().startswith("3.10")