Skip to content

Commit

Permalink
ci: use 'matrix' transforms for test kind
Browse files Browse the repository at this point in the history
  • Loading branch information
ahal committed Oct 9, 2024
1 parent ec21d7d commit 74d2a42
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 41 deletions.
2 changes: 1 addition & 1 deletion taskcluster/kinds/codecov/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tasks:
set-name: null
fetches:
test:
- artifact: coverage.{python_version}
- artifact: coverage.{matrix[python]}
worker-type: t-linux
worker:
docker-image: {in-tree: python}
Expand Down
23 changes: 17 additions & 6 deletions taskcluster/kinds/test/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
loader: taskgraph.loader.transform:loader

transforms:
- self_taskgraph.transforms.test
- taskgraph.transforms.matrix
- taskgraph.transforms.run
- taskgraph.transforms.task

Expand All @@ -15,6 +15,7 @@ kind-dependencies:

task-defaults:
attributes:
artifact_prefix: public
retrigger: true
code-review: true
worker-type: t-linux
Expand All @@ -37,10 +38,20 @@ task-defaults:

tasks:
unit:
description: "Run `unit tests` to validate the latest changes"
attributes:
artifact_prefix: public
python-versions: ["3.13", "3.12", "3.11", "3.10", "3.9", "3.8"]
description: "Run unit tests with py{matrix[python]}"
matrix:
set-name: "unit-py{matrix[python]}"
substitution-fields: [description, run.command, treeherder, worker]
python: ["313", "312", "311", "310", "39", "38"]
worker:
artifacts:
- type: file
path: "/builds/worker/artifacts/coverage"
name: "public/coverage.py{matrix[python]}"
env:
UV_PYTHON: "{matrix[python]}"
treeherder:
symbol: unit(py{matrix[python]})
run:
command: >-
uv run coverage run --data-file $MOZ_ARTIFACT_DIR/coverage --context=$PYTHON_VERSION -m pytest -vv
uv run coverage run --data-file /builds/worker/artifacts/coverage --context=py{matrix[python]} -m pytest -vv
34 changes: 0 additions & 34 deletions taskcluster/self_taskgraph/transforms/test.py

This file was deleted.

0 comments on commit 74d2a42

Please sign in to comment.