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
58 changes: 29 additions & 29 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/checkout.yml
- script: |
set -eux -o pipefail
Expand Down Expand Up @@ -65,21 +65,21 @@ jobs:
directory: tools/
toxenv: py38

- job: tools_unittest_mac_py313
displayName: 'tools/ unittests: macOS + Python 3.13'
- job: tools_unittest_mac_py314
displayName: 'tools/ unittests: macOS + Python 3.14'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
vmImage: 'macOS-14'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/
toxenv: py313
toxenv: py314

- job: wptrunner_unittest_mac_py38
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.8'
Expand All @@ -97,21 +97,21 @@ jobs:
directory: tools/wptrunner/
toxenv: py38

- job: wptrunner_unittest_mac_py313
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.13'
- job: wptrunner_unittest_mac_py314
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.14'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
vmImage: 'macOS-14'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/wptrunner/
toxenv: py313
toxenv: py314

- job: wpt_integration_mac_py38
displayName: 'tools/wpt/ tests: macOS + Python 3.8'
Expand All @@ -131,8 +131,8 @@ jobs:
directory: tools/wpt/
toxenv: py38

- job: wpt_integration_mac_py313
displayName: 'tools/wpt/ tests: macOS + Python 3.13'
- job: wpt_integration_mac_py314
displayName: 'tools/wpt/ tests: macOS + Python 3.14'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
Expand All @@ -141,13 +141,13 @@ jobs:
# full checkout required
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/wpt/
toxenv: py313
toxenv: py314

- job: tools_unittest_win_py38
displayName: 'tools/ unittests: Windows + Python 3.8'
Expand All @@ -168,22 +168,22 @@ jobs:
directory: tools/
toxenv: py38

- job: tools_unittest_win_py313
displayName: 'tools/ unittests: Windows + Python 3.13'
- job: tools_unittest_win_py314
displayName: 'tools/ unittests: Windows + Python 3.14'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
vmImage: 'windows-latest'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
addToPath: false
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/
toxenv: py313
toxenv: py314

- job: wptrunner_unittest_win_py38
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.8'
Expand All @@ -202,22 +202,22 @@ jobs:
directory: tools/wptrunner/
toxenv: py38

- job: wptrunner_unittest_win_py313
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.13'
- job: wptrunner_unittest_win_py314
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.14'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
vmImage: 'windows-latest'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
addToPath: false
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/wptrunner/
toxenv: py313
toxenv: py314

- job: wpt_integration_win_py38
displayName: 'tools/wpt/ tests: Windows + Python 3.8'
Expand All @@ -237,8 +237,8 @@ jobs:
directory: tools/wpt/
toxenv: py38

- job: wpt_integration_win_py313
displayName: 'tools/wpt/ tests: Windows + Python 3.13'
- job: wpt_integration_win_py314
displayName: 'tools/wpt/ tests: Windows + Python 3.14'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
Expand All @@ -247,13 +247,13 @@ jobs:
# full checkout required
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/wpt/
toxenv: py313
toxenv: py314

- job: results_edge_stable
displayName: 'all tests: Edge Stable'
Expand All @@ -269,7 +269,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/system_info.yml
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/install_certs.yml
Expand Down Expand Up @@ -305,7 +305,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/system_info.yml
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/install_certs.yml
Expand Down Expand Up @@ -342,7 +342,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/install_certs.yml
- template: tools/ci/azure/install_edge.yml
Expand Down Expand Up @@ -376,7 +376,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
versionSpec: '3.14'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/install_certs.yml
- template: tools/ci/azure/color_profile.yml
Expand Down
28 changes: 14 additions & 14 deletions tools/ci/tc/tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ components:
- python3.8-dev
- python3.8-venv

tox-python3_13:
tox-python3_14:
env:
TOXENV: py313
TOXENV: py314
PY_COLORS: "0"
install:
- python3.13
- python3.13-dev
- python3.13-venv
- python3.14
- python3.14-dev
- python3.14-venv
tests-affected:
options:
browser:
Expand Down Expand Up @@ -588,13 +588,13 @@ tasks:
run-job:
- tools_unittest

- tools/ unittests (Python 3.13):
- tools/ unittests (Python 3.14):
description: >-
Unit tests for tools running under Python 3.13, excluding wptrunner
Unit tests for tools running under Python 3.14, excluding wptrunner
use:
- wpt-base
- trigger-pr
- tox-python3_13
- tox-python3_14
command: ./tools/ci/ci_tools_unittest.sh
env:
HYPOTHESIS_PROFILE: ci
Expand Down Expand Up @@ -624,13 +624,13 @@ tasks:
run-job:
- wpt_integration

- tools/ integration tests (Python 3.13):
- tools/ integration tests (Python 3.14):
description: >-
Integration tests for tools running under Python 3.13
Integration tests for tools running under Python 3.14
use:
- wpt-base
- trigger-pr
- tox-python3_13
- tox-python3_14
command: ./tools/ci/ci_tools_integration_test.sh
install:
- libnss3-tools
Expand Down Expand Up @@ -665,13 +665,13 @@ tasks:
run-job:
- resources_unittest

- resources/ tests (Python 3.13):
- resources/ tests (Python 3.14):
description: >-
Tests for testharness.js and other files in resources/ under Python 3.13
Tests for testharness.js and other files in resources/ under Python 3.14
use:
- wpt-base
- trigger-pr
- tox-python3_13
- tox-python3_14
command: ./tools/ci/ci_resources_unittest.sh
install:
- libnss3-tools
Expand Down
42 changes: 30 additions & 12 deletions tools/ci/tc/tests/test_valid.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# mypy: ignore-errors
from urllib.parse import urlsplit

import json
import os
Expand All @@ -9,6 +10,8 @@
import pytest
import yaml
from jsonschema import validate
from referencing import Resource
from referencing.jsonschema import DRAFT6, SchemaRegistry

from tools.ci.tc import decision

Expand Down Expand Up @@ -86,13 +89,24 @@ def test_verify_payload():
"""Verify that the decision task produces tasks with a valid payload"""
from tools.ci.tc.decision import decide

r = httpx.get("https://community-tc.services.mozilla.com/schemas/queue/v1/create-task-request.json")
r.raise_for_status()
create_task_schema = r.json()
schema_urls = ["https://community-tc.services.mozilla.com/schemas/common/metaschema.json",
"https://community-tc.services.mozilla.com/schemas/queue/v1/task-metadata.json",
"https://community-tc.services.mozilla.com/schemas/queue/v1/task.json",
"https://community-tc.services.mozilla.com/schemas/queue/v1/create-task-request.json",
"https://community-tc.services.mozilla.com/references/schemas/docker-worker/v1/payload.json"]

r = httpx.get("https://community-tc.services.mozilla.com/references/schemas/docker-worker/v1/payload.json")
r.raise_for_status()
payload_schema = r.json()
schemas = {}
for schema_url in schema_urls:
name = urlsplit(schema_url).path.rsplit("/", 1)[-1].rsplit(".", 1)[0]
r = httpx.get(schema_url)
r.raise_for_status()
schemas[name] = (schema_url, r.json())


registry = SchemaRegistry()
for url, schema_doc in schemas.values():
resource = Resource.from_contents(schema_doc, default_specification=DRAFT6)
registry = registry.with_resource(url, resource)

jobs = ["lint",
"manifest_upload",
Expand All @@ -111,8 +125,12 @@ def test_verify_payload():
task_id_map = decide(event)
for name, (task_id, task_data) in task_id_map.items():
try:
validate(instance=task_data, schema=create_task_schema)
validate(instance=task_data["payload"], schema=payload_schema)
validate(instance=task_data,
schema=schemas["create-task-request"][1],
registry=registry)
validate(instance=task_data["payload"],
schema=schemas["payload"][1],
registry=registry)
except Exception as e:
print(f"Validation failed for task '{name}':\n{json.dumps(task_data, indent=2)}")
raise e
Expand Down Expand Up @@ -177,11 +195,11 @@ def test_verify_payload():
("pr_event.json", True, {".taskcluster.yml", ".travis.yml", "tools/ci/start.sh"},
['lint',
'tools/ unittests (Python 3.8)',
'tools/ unittests (Python 3.13)',
'tools/ unittests (Python 3.14)',
'tools/ integration tests (Python 3.8)',
'tools/ integration tests (Python 3.13)',
'tools/ integration tests (Python 3.14)',
'resources/ tests (Python 3.8)',
'resources/ tests (Python 3.13)',
'resources/ tests (Python 3.14)',
'download-firefox-nightly',
'infrastructure/ tests (firefox)',
'infrastructure/ tests (chrome)',
Expand All @@ -201,7 +219,7 @@ def test_verify_payload():
("pr_event_tests_affected.json", True, {"resources/testharness.js"},
['lint',
'resources/ tests (Python 3.8)',
'resources/ tests (Python 3.13)',
'resources/ tests (Python 3.14)',
'download-firefox-nightly',
'infrastructure/ tests (firefox)',
'infrastructure/ tests (chrome)',
Expand Down
3 changes: 2 additions & 1 deletion tools/manifest/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
zstandard==0.23.0
zstandard==0.23.0; python_version < '3.9'
zstandard==0.25.0; python_version >= '3.9'
3 changes: 2 additions & 1 deletion tools/requirements_mypy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ types-atomicwrites==1.4.5.1
types-html5lib==1.1.11.20241018
types-setuptools==75.8.0.20250110
types-ujson==5.10.0.20240515
typing_extensions==4.12.2
typing_extensions==4.15.0; python_version >= '3.9'
typing_extensions==4.13.2; python_version < '3.9'

# Install dependencies so we get type signatures from them.
-r ci/requirements_build.txt
Expand Down
3 changes: 2 additions & 1 deletion tools/requirements_tests.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
httpx[http2]==0.27.2
json-e==4.7.0
jsonschema==4.17.3
jsonschema==4.25.1; python_version >= '3.9'
jsonschema==4.23.0; python_version < '3.9'
pyyaml==6.0.1
types-pyyaml==6.0.12.20241230
taskcluster==91.0.1
Expand Down
2 changes: 1 addition & 1 deletion tools/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38,py39,py310,py311,py312,py313,{py38,py39,py310,py311,py312,py313}-{flake8,mypy}
envlist = py38,py39,py310,py311,py312,py313,py314,{py38,py39,py310,py311,py312,py313,py314}-{flake8,mypy}
skipsdist=True
skip_missing_interpreters=False

Expand Down
Loading
Loading