Skip to content

Commit 7b41416

Browse files
committed
ci: add integration tests that run with lowest and highest dependency resolution
1 parent 8a96627 commit 7b41416

8 files changed

Lines changed: 1614 additions & 937 deletions

File tree

pyproject.toml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies = [
2424
"appdirs>=1.4",
2525
"cookiecutter~=2.1",
2626
"json-e>=2.7",
27-
"mozilla-repo-urls",
27+
"mozilla-repo-urls>=0.1.1",
2828
"msgspec>=0.20.0",
2929
"PyYAML>=5.3.1",
3030
"redo>=2.0",
@@ -37,26 +37,26 @@ dependencies = [
3737

3838
[dependency-groups]
3939
dev = [
40-
"coverage",
41-
"mock",
42-
"pre-commit",
43-
"pyright",
44-
"pytest",
45-
"pytest-mock",
46-
"pytest-taskgraph",
47-
"responses",
48-
"sphinx",
49-
"sphinx-autobuild",
50-
"sphinx-argparse",
51-
"sphinx-book-theme >=1",
52-
"sphinx-taskgraph",
53-
"sphinxcontrib-mermaid",
54-
"zstandard",
40+
"coverage>=7.10.7",
41+
"mock>=5.2.0",
42+
"pre-commit>=4.3.0",
43+
"pyright>=1.1.406",
44+
"pytest>=8.4.2",
45+
"pytest-mock>=3.15.1",
46+
"pytest-taskgraph>=0.2.0",
47+
"responses>=0.25.8",
48+
"sphinx>=7.4.7",
49+
"sphinx-autobuild>=2024.04.16",
50+
"sphinx-argparse>=0.4.0",
51+
"sphinx-book-theme >=1.1.4",
52+
"sphinx-taskgraph>=0.1.0",
53+
"sphinxcontrib-mermaid>=1.0.0",
54+
"zstandard>=0.25.0",
5555
]
5656

5757
[project.optional-dependencies]
58-
load-image = ["zstandard"]
59-
orjson = ["orjson"]
58+
load-image = ["zstandard>=0.23.0"]
59+
orjson = ["orjson>=3"]
6060

6161
[project.scripts]
6262
taskgraph = "taskgraph.main:main"

taskcluster/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ treeherder:
77
'check': 'Checks and lints'
88
'doc': 'Documentation tasks'
99
'unit': 'Unit test tasks'
10+
'integration': 'Integration test tasks'
1011

1112
index:
1213
products:

taskcluster/kinds/codecov/kind.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ tasks:
2424
with-attributes:
2525
# exclude free-threaded python until it is officially supported
2626
python: ["314", "313", "312", "311", "310", "39"]
27+
resolution: default
2728
fetches:
2829
test:
2930
- artifact: coverage.py{matrix[python]}

taskcluster/kinds/complete/kind.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ tasks:
2424
with-attributes:
2525
# exclude free-threaded python until it is officially supported
2626
python: ["314", "313", "312", "311", "310", "39"]
27+
# exclude integration tests that ignore the lockfile
28+
resolution: default
2729
# needs to be added explicitly until we can drop the `with-attributes` above
2830
dependencies:
2931
check-type: check-type

taskcluster/kinds/test/kind.yml

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -13,62 +13,6 @@ transforms:
1313
kind-dependencies:
1414
- docker-image
1515

16-
task-defaults:
17-
attributes:
18-
artifact_prefix: public
19-
retrigger: true
20-
code-review: true
21-
worker:
22-
max-run-time: 1800
23-
env:
24-
PYTHONUTF8: "0"
25-
PYTHONCOERCECLOCALE: "0"
26-
HGENCODING: "utf-8"
27-
treeherder:
28-
kind: test
29-
tier: 1
30-
run:
31-
using: run-task
32-
cwd: '{checkout}'
33-
use-caches: [checkout, uv]
34-
35-
tasks:
36-
unit-linux:
37-
description: "Run unit tests with py{matrix[python]} on Linux"
38-
matrix:
39-
set-name: "unit-py{matrix[python]}"
40-
substitution-fields: [description, run.command, treeherder, worker, attributes]
41-
python: ["314t", "314", "313", "312", "311", "310", "39"]
42-
attributes:
43-
python: "{matrix[python]}"
44-
platform: linux
45-
worker-type: t-linux
46-
worker:
47-
docker-image: {in-tree: python}
48-
artifacts:
49-
- type: file
50-
path: "/builds/worker/artifacts/coverage"
51-
name: "public/coverage.py{matrix[python]}"
52-
env:
53-
LC_ALL: "C"
54-
UV_PYTHON: "{matrix[python]}"
55-
treeherder:
56-
platform: test-linux/opt
57-
symbol: unit(py{matrix[python]})
58-
run:
59-
command: >-
60-
uv run coverage run --data-file /builds/worker/artifacts/coverage --context=py{matrix[python]} -m pytest -vv
61-
62-
unit-win:
63-
description: "Run unit tests with python on Windows"
64-
attributes:
65-
platform: windows
66-
worker-type: t-windows
67-
treeherder:
68-
platform: test-win/opt
69-
symbol: unit(py)
70-
run:
71-
command: >-
72-
python3 -V &&
73-
powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex' &&
74-
~/.local/bin/uv.exe run -m pytest -vv
16+
tasks-from:
17+
- linux.yml
18+
- windows.yml

taskcluster/kinds/test/linux.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
task-defaults:
2+
matrix:
3+
substitution-fields:
4+
- attributes
5+
- description
6+
- run.command
7+
- treeherder
8+
- worker
9+
attributes:
10+
artifact_prefix: public
11+
retrigger: true
12+
code-review: true
13+
python: "{matrix[python]}"
14+
platform: linux
15+
resolution: default
16+
worker-type: t-linux
17+
worker:
18+
docker-image: {in-tree: python}
19+
max-run-time: 1800
20+
env:
21+
PYTHONUTF8: "0"
22+
PYTHONCOERCECLOCALE: "0"
23+
HGENCODING: "utf-8"
24+
LC_ALL: "C"
25+
UV_PYTHON: "{matrix[python]}"
26+
treeherder:
27+
platform: test-linux/opt
28+
kind: test
29+
tier: 1
30+
run:
31+
using: run-task
32+
cwd: '{checkout}'
33+
use-caches: [checkout, uv]
34+
35+
unit:
36+
description: "Run unit tests with py{matrix[python]} on Linux"
37+
matrix:
38+
set-name: "unit-py{matrix[python]}"
39+
substitution-fields: [description, run.command, treeherder, worker, attributes]
40+
python: ["314t", "314", "313", "312", "311", "310", "39"]
41+
worker:
42+
docker-image: {in-tree: python}
43+
artifacts:
44+
- type: file
45+
path: "/builds/worker/artifacts/coverage"
46+
name: "public/coverage.py{matrix[python]}"
47+
treeherder:
48+
symbol: unit(py{matrix[python]})
49+
run:
50+
command: >-
51+
uv run coverage run --data-file /builds/worker/artifacts/coverage --context=py{matrix[python]} -m pytest -vv
52+
53+
integration:
54+
description: "Run unit tests with py{matrix[python]} on Linux with resolution {matrix[resolution]}"
55+
attributes:
56+
resolution: "{matrix[resolution]}"
57+
matrix:
58+
set-name: "integration-py{matrix[python]}-deps-{matrix[resolution]}"
59+
python: ["314", "39"]
60+
resolution: ["highest", "lowest-direct"]
61+
exclude:
62+
- python: "314"
63+
resolution: "lowest-direct"
64+
- python: "39"
65+
resolution: "highest"
66+
67+
treeherder:
68+
symbol: integration(py{matrix[python]}-{matrix[resolution]})
69+
run:
70+
command: >-
71+
uv run --isolated --resolution={matrix[resolution]} pytest -vv

taskcluster/kinds/test/windows.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
task-defaults:
2+
attributes:
3+
artifact_prefix: public
4+
retrigger: true
5+
code-review: true
6+
worker:
7+
max-run-time: 1800
8+
env:
9+
PYTHONUTF8: "0"
10+
PYTHONCOERCECLOCALE: "0"
11+
HGENCODING: "utf-8"
12+
treeherder:
13+
kind: test
14+
tier: 1
15+
run:
16+
using: run-task
17+
cwd: '{checkout}'
18+
use-caches: [checkout, uv]
19+
20+
unit-win:
21+
description: "Run unit tests with python on Windows"
22+
attributes:
23+
platform: windows
24+
worker-type: t-windows
25+
treeherder:
26+
platform: test-win/opt
27+
symbol: unit(py)
28+
run:
29+
command: >-
30+
python3 -V &&
31+
powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex' &&
32+
~/.local/bin/uv.exe run -m pytest -vv

0 commit comments

Comments
 (0)