Skip to content

Commit b6b11a0

Browse files
committed
👷 Tweak CI for tests
1 parent 0c2f90c commit b6b11a0

File tree

6 files changed

+21
-942
lines changed

6 files changed

+21
-942
lines changed

.github/workflows/smokeshow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
version: "0.4.15"
3434
enable-cache: true
3535
cache-dependency-glob: |
36+
requirements**.txt
3637
pyproject.toml
37-
uv.lock
38-
- run: uv sync
38+
- run: uv pip install -r requirements-tests.txt
3939
- uses: actions/download-artifact@v5
4040
with:
4141
name: coverage-html

.github/workflows/test-redistribute.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,8 @@ jobs:
2525
uses: actions/setup-python@v6
2626
with:
2727
python-version: "3.10"
28-
- name: Setup uv
29-
uses: astral-sh/setup-uv@v6
30-
with:
31-
version: "0.4.15"
32-
enable-cache: true
33-
cache-dependency-glob: |
34-
pyproject.toml
35-
uv.lock
3628
- name: Install build dependencies
37-
run: uv pip install build
29+
run: pip install build
3830
- name: Build source distribution
3931
run: python -m build --sdist
4032
- name: Decompress source distribution
@@ -44,19 +36,15 @@ jobs:
4436
- name: Install test dependencies
4537
run: |
4638
cd dist/annotated-doc*/
47-
uv sync
39+
pip install -r requirements-tests.txt
4840
- name: Run source distribution tests
4941
run: |
5042
cd dist/annotated-doc*/
5143
bash scripts/test.sh
5244
- name: Build wheel distribution
5345
run: |
5446
cd dist
55-
uv pip wheel --no-deps annotated-doc*.tar.gz
56-
- name: Dump GitHub context
57-
env:
58-
GITHUB_CONTEXT: ${{ toJson(github) }}
59-
run: echo "$GITHUB_CONTEXT"
47+
pip wheel --no-deps annotated-doc*.tar.gz
6048
6149
# https://github.com/marketplace/actions/alls-green#why
6250
test-redistribute-alls-green: # This job does nothing and is only used for the branch protection

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,33 +55,33 @@ jobs:
5555
with:
5656
python-version: ${{ matrix.python-version }}
5757
- name: Setup uv
58-
uses: astral-sh/setup-uv@v6
58+
uses: astral-sh/setup-uv@v7
5959
with:
6060
version: "0.4.15"
6161
enable-cache: true
6262
cache-dependency-glob: |
63+
requirements**.txt
6364
pyproject.toml
64-
uv.lock
6565
# Allow debugging with tmate
6666
- name: Setup tmate session
6767
uses: mxschmitt/action-tmate@v3
6868
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
6969
with:
7070
limit-access-to-actor: true
7171
- name: Install Dependencies
72-
run: uv sync
72+
run: uv pip install -r requirements-tests.txt
7373
- name: Lint
7474
run: bash scripts/lint.sh
7575
- run: mkdir coverage
7676
- name: Test
7777
run: bash scripts/test.sh
7878
env:
79-
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }}
79+
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
8080
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
8181
- name: Store coverage files
8282
uses: actions/upload-artifact@v4
8383
with:
84-
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
84+
name: coverage-${{ runner.os }}-${{ matrix.python-version }}
8585
path: coverage
8686
include-hidden-files: true
8787

@@ -93,23 +93,23 @@ jobs:
9393
- uses: actions/checkout@v5
9494
- uses: actions/setup-python@v6
9595
with:
96-
python-version: '3.13'
96+
python-version: '3.8'
9797
- name: Setup uv
98-
uses: astral-sh/setup-uv@v6
98+
uses: astral-sh/setup-uv@v7
9999
with:
100100
version: "0.4.15"
101101
enable-cache: true
102102
cache-dependency-glob: |
103+
requirements**.txt
103104
pyproject.toml
104-
uv.lock
105105
- name: Get coverage files
106106
uses: actions/download-artifact@v5
107107
with:
108108
pattern: coverage-*
109109
path: coverage
110110
merge-multiple: true
111111
- name: Install Dependencies
112-
run: uv sync
112+
run: uv pip install -r requirements-tests.txt
113113
- run: ls -la coverage
114114
- run: coverage combine coverage
115115
- run: coverage report

pyproject.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,3 @@ ignore = [
9090
[tool.ruff.lint.pyupgrade]
9191
# Preserve types, even if a file imports `from __future__ import annotations`.
9292
keep-runtime-typing = true
93-
94-
[dependency-groups]
95-
dev = [
96-
"coverage>=7.6.1",
97-
"mypy>=1.14.1",
98-
"pytest>=8.3.5",
99-
"ruff>=0.14.1",
100-
"smokeshow>=0.5.0",
101-
]

requirements-tests.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-e .
2+
3+
pytest >=8.3.5
4+
coverage[toml] >=7.6.1
5+
mypy ==1.14.1
6+
ruff ==0.14.1
7+
smokeshow >=0.5.0

0 commit comments

Comments
 (0)