-
Notifications
You must be signed in to change notification settings - Fork 49
ci: add integration tests that run with lowest and highest dependency… #897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ dependencies = [ | |
| "appdirs>=1.4", | ||
| "cookiecutter~=2.1", | ||
| "json-e>=2.7", | ||
| "mozilla-repo-urls", | ||
| "mozilla-repo-urls>=0.1.1", | ||
| "PyYAML>=5.3.1", | ||
| "redo>=2.0", | ||
| "requests>=2.25", | ||
|
|
@@ -36,26 +36,26 @@ dependencies = [ | |
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
| "coverage", | ||
| "mock", | ||
| "pre-commit", | ||
| "pyright", | ||
| "pytest", | ||
| "pytest-mock", | ||
| "pytest-taskgraph", | ||
| "responses", | ||
| "sphinx", | ||
| "sphinx-autobuild", | ||
| "sphinx-argparse", | ||
| "sphinx-book-theme >=1", | ||
| "sphinx-taskgraph", | ||
| "sphinxcontrib-mermaid", | ||
| "zstandard", | ||
| "coverage>=7.10.7", | ||
| "mock>=5.2.0", | ||
| "pre-commit>=4.3.0", | ||
| "pyright>=1.1.406", | ||
| "pytest>=8.4.2", | ||
| "pytest-mock>=3.15.1", | ||
| "pytest-taskgraph>=0.2.0", | ||
| "responses>=0.25.8", | ||
| "sphinx>=7.4.7", | ||
| "sphinx-autobuild>=2024.04.16", | ||
| "sphinx-argparse>=0.4.0", | ||
| "sphinx-book-theme >=1.1.4", | ||
| "sphinx-taskgraph>=0.1.0", | ||
| "sphinxcontrib-mermaid>=1.0.0", | ||
| "zstandard>=0.25.0", | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just put a minimum bound to the maximum version that still support 3.9 for these. They're just dev dependencies, so no need to keep a wide constraint. |
||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| load-image = ["zstandard"] | ||
| orjson = ["orjson"] | ||
| load-image = ["zstandard>=0.23.0"] | ||
| orjson = ["orjson>=3"] | ||
|
|
||
| [project.scripts] | ||
| taskgraph = "taskgraph.main:main" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| task-defaults: | ||
| matrix: | ||
| substitution-fields: | ||
| - attributes | ||
| - description | ||
| - run.command | ||
| - treeherder | ||
| - worker | ||
| attributes: | ||
| artifact_prefix: public | ||
| retrigger: true | ||
| code-review: true | ||
| python: "{matrix[python]}" | ||
| platform: linux | ||
| resolution: default | ||
| worker-type: t-linux | ||
| worker: | ||
| docker-image: {in-tree: python} | ||
| max-run-time: 1800 | ||
| env: | ||
| PYTHONUTF8: "0" | ||
| PYTHONCOERCECLOCALE: "0" | ||
| HGENCODING: "utf-8" | ||
| LC_ALL: "C" | ||
| UV_PYTHON: "{matrix[python]}" | ||
| treeherder: | ||
| platform: test-linux/opt | ||
| kind: test | ||
| tier: 1 | ||
| run: | ||
| using: run-task | ||
| cwd: '{checkout}' | ||
| use-caches: [checkout, uv] | ||
|
|
||
| unit: | ||
| description: "Run unit tests with py{matrix[python]} on Linux" | ||
| matrix: | ||
| set-name: "unit-py{matrix[python]}" | ||
| substitution-fields: [description, run.command, treeherder, worker, attributes] | ||
| python: ["314t", "314", "313", "312", "311", "310", "39"] | ||
| worker: | ||
| docker-image: {in-tree: python} | ||
| artifacts: | ||
| - type: file | ||
| path: "/builds/worker/artifacts/coverage" | ||
| name: "public/coverage.py{matrix[python]}" | ||
| treeherder: | ||
| symbol: unit(py{matrix[python]}) | ||
| run: | ||
| command: >- | ||
| uv run coverage run --data-file /builds/worker/artifacts/coverage --context=py{matrix[python]} -m pytest -vv | ||
|
|
||
| integration: | ||
| description: "Run unit tests with py{matrix[python]} on Linux with resolution {matrix[resolution]}" | ||
| attributes: | ||
| resolution: "{matrix[resolution]}" | ||
| matrix: | ||
| set-name: "integration-py{matrix[python]}-deps-{matrix[resolution]}" | ||
| python: ["314", "39"] | ||
| resolution: ["highest", "lowest-direct"] | ||
| exclude: | ||
| - python: "314" | ||
| resolution: "lowest-direct" | ||
| - python: "39" | ||
| resolution: "highest" | ||
|
|
||
| treeherder: | ||
| symbol: integration(py{matrix[python]}-{matrix[resolution]}) | ||
| run: | ||
| command: >- | ||
| uv run --isolated --resolution={matrix[resolution]} pytest -vv |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| task-defaults: | ||
| attributes: | ||
| artifact_prefix: public | ||
| retrigger: true | ||
| code-review: true | ||
| worker: | ||
| max-run-time: 1800 | ||
| env: | ||
| PYTHONUTF8: "0" | ||
| PYTHONCOERCECLOCALE: "0" | ||
| HGENCODING: "utf-8" | ||
| treeherder: | ||
| kind: test | ||
| tier: 1 | ||
| run: | ||
| using: run-task | ||
| cwd: '{checkout}' | ||
| use-caches: [checkout, uv] | ||
|
|
||
| unit-win: | ||
| description: "Run unit tests with python on Windows" | ||
| attributes: | ||
| platform: windows | ||
| worker-type: t-windows | ||
| worker: | ||
| taskcluster-proxy: true | ||
|
Comment on lines
+25
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised this enables the proxy, I wouldn't have expected it to be needed (I know you're just moving this code here, I just hadn't noticed this before).
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly I didn't notice either. @bhearsum was this intentional? I'll leave it in this PR, we can attempt disabling in a follow-up
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have recollection of needing it. It could be copy/paste failure, or something I failed to document. I've opened #900 to remove it, and we'll see if that passes tests. |
||
| treeherder: | ||
| platform: test-win/opt | ||
| symbol: unit(py) | ||
| run: | ||
| command: >- | ||
| python3 -V && | ||
| powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex' && | ||
| ~/.local/bin/uv.exe run -m pytest -vv | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the last version that supports Python 3.9 and 3.10..
This might bite us eventually if we ever need to depend on a new change there.