diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 918850a2..0905c231 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -46,7 +46,8 @@ jobs: if: steps.setup.conclusion == 'success' run: | Start-Process -FilePath "C:\Program Files\Custom Firefox\firefox.exe" -ArgumentList "--version" -Wait -NoNewWindow - pipenv run pytest -n 4 . + python -c "import platform; print(platform.uname())" + pipenv run pytest -n 4 tests/meta $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE @@ -54,7 +55,7 @@ jobs: run: | rm ./pyproject.toml; mv ./ci_pyproject_headed.toml ./pyproject.toml; - pipenv run pytest -n 4 . + pipenv run pytest -n 4 tests/menus $env:TEST_EXIT_CODE = $LASTEXITCODE rm artifacts/assets -r -Force mv artifacts/* artifacts-win @@ -88,14 +89,16 @@ jobs: if: steps.setup.conclusion == 'success' run: | /Volumes/Firefox/Firefox.app/Contents/MacOS/firefox --version - pipenv run pytest --fx-executable=/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox -n 4 . || TEST_EXIT_CODE=$? + python -c "import platform; print(platform.uname())" + python -c "import platform; print(platform.mac_ver())" + pipenv run pytest --fx-executable=/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox -n 4 tests/meta || TEST_EXIT_CODE=$? mv artifacts artifacts-mac || true exit $TEST_EXIT_CODE - name: Run Smoke Tests in MacOS (Headed) if: steps.setup.conclusion == 'success' run: | mv ./ci_pyproject_headed.toml ./pyproject.toml; - pipenv run pytest --fx-executable=/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox -n 4 . || TEST_EXIT_CODE=$? + pipenv run pytest --fx-executable=/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox -n 4 tests/menus || TEST_EXIT_CODE=$? mv -r artifacts/* artifacts-mac/ || true exit $TEST_EXIT_CODE - name: Upload artifacts diff --git a/taskcluster/config.yml b/taskcluster/config.yml index 726ed853..ab01cb4e 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -30,3 +30,16 @@ workers: implementation: generic-worker os: linux worker-type: 't-linux-2204-wayland' + t-mac: + provisioner: releng-hardware + implementation: generic-worker + os: macosx + worker-type: + by-level: + "3": mozilla-b-3-osx + default: mozilla-b-1-osx + t-win2022: + provisioner: 'mozilla-{level}' + implementation: generic-worker + os: windows + worker-type: b-win2022 diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 027c2bd6..0f705208 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -5,7 +5,7 @@ transforms: task-defaults: label: "Smoke Tests" description: "Runs Smoke Tests and Notifies Slack" - worker-type: t-linux-wayland + worker-type: t-win2022 worker: max-run-time: 1800 artifacts: @@ -25,16 +25,18 @@ tasks: cwd: "{checkout}" command: |- export PATH=$HOME/.local/bin:$PWD:$PATH + echo "windows test" mkdir -p artifacts; - pip3 install 'pipenv==2023.11.15'; - pip3 install 'ruff>=0.4.8,<0.5'; + pip install 'pipenv==2023.11.15'; + pip install 'ruff>=0.4.8,<0.5'; mv ./ci_pyproject.toml ./pyproject.toml; pipenv install; + python -c "import platform; print(platform.uname())" ./collect_executables.sh; ./firefox/firefox --version; - pipenv run pytest --fx-executable ./firefox/firefox -n 4 .; + pipenv run pytest --fx-executable ./firefox/firefox -n 4 tests/meta; mv ./ci_pyproject_headed.toml ./pyproject.toml; - pipenv run pytest --fx-executable ./firefox/firefox -n 4 . + pipenv run pytest --fx-executable ./firefox/firefox -n 4 tests/menus notify: recipients: - type: slack-channel diff --git a/tests/downloads/test_add_zip_type.py b/tests/downloads/test_add_zip_type.py index 88edf7f8..718d14a4 100644 --- a/tests/downloads/test_add_zip_type.py +++ b/tests/downloads/test_add_zip_type.py @@ -22,7 +22,9 @@ def test_add_zip_type(driver: Firefox): about_prefs = AboutPrefs(driver, category="general") # Click on the available zip - web_page.find_element(By.XPATH, "//td/a[@href='/pub/firefox/releases/0.9rc/Firefox-win32-0.9rc.zip']").click() + web_page.find_element( + By.XPATH, "//td/a[@href='/pub/firefox/releases/0.9rc/Firefox-win32-0.9rc.zip']" + ).click() # In the download panel right-click on the download and click "Always Open Similar Files" with driver.context(driver.CONTEXT_CHROME): @@ -31,4 +33,4 @@ def test_add_zip_type(driver: Firefox): # Open about:preferences and check that zip mime type is present in the application list about_prefs.open() - about_prefs.element_exists("mime-type", labels=["application/zip"]) \ No newline at end of file + about_prefs.element_exists("mime-type", labels=["application/zip"])