|
72 | 72 | gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
73 | 73 | github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
74 | 74 |
|
| 75 | + linux-test-vm: |
| 76 | + runs-on: ubuntu-24.04 |
| 77 | + environment: Credentials |
| 78 | + needs: [ linux-build-opt ] |
| 79 | + outputs: |
| 80 | + instance_name: ${{ steps.create_vm.outputs.instance_name }} |
| 81 | + |
| 82 | + permissions: |
| 83 | + contents: 'read' |
| 84 | + id-token: 'write' |
| 85 | + |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@v5 |
| 88 | + with: |
| 89 | + sparse-checkout: | |
| 90 | + .github/actions/ |
| 91 | + sparse-checkout-cone-mode: false |
| 92 | + |
| 93 | + - id: create_vm |
| 94 | + uses: ./.github/actions/create-vm |
| 95 | + with: |
| 96 | + instance_kind: "linux-test" |
| 97 | + gcp_machine_type: "c4d-standard-2" |
| 98 | + gcp_provisioning_model: "STANDARD" |
| 99 | + extra_labels: "test,LinuxNative" |
| 100 | + gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
| 101 | + github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
| 102 | + |
| 103 | + linux-test-vm-clean: |
| 104 | + runs-on: ubuntu-24.04 |
| 105 | + environment: Credentials |
| 106 | + needs: [ linux-test-vm, linux-test ] |
| 107 | + if: "always()" |
| 108 | + |
| 109 | + permissions: |
| 110 | + contents: 'read' |
| 111 | + id-token: 'write' |
| 112 | + |
| 113 | + steps: |
| 114 | + - uses: actions/checkout@v5 |
| 115 | + with: |
| 116 | + sparse-checkout: | |
| 117 | + .github/actions/ |
| 118 | + sparse-checkout-cone-mode: false |
| 119 | + |
| 120 | + - id: delete_vm |
| 121 | + uses: ./.github/actions/delete-vm |
| 122 | + with: |
| 123 | + instance_name: ${{ needs.linux-test-vm.outputs.instance_name }} |
| 124 | + gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
| 125 | + github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
| 126 | + |
75 | 127 | linux-build-opt: |
76 | 128 | runs-on: [ self-hosted, LinuxNative, X64 ] |
77 | 129 | needs: linux-build-vm |
@@ -102,6 +154,46 @@ jobs: |
102 | 154 | path: obj-*/dist/firefox-*.tar* |
103 | 155 | compression-level: 0 |
104 | 156 |
|
| 157 | + linux-test: |
| 158 | + runs-on: [self-hosted, LinuxNative, X64] |
| 159 | + needs: [ linux-test-vm, package-tests ] |
| 160 | + |
| 161 | + steps: |
| 162 | + - name: "download firefox build" |
| 163 | + uses: actions/download-artifact@v5 |
| 164 | + with: |
| 165 | + name: firefox-linux-amd64 |
| 166 | + |
| 167 | + - name: "download enterprise tests" |
| 168 | + uses: actions/download-artifact@v5 |
| 169 | + with: |
| 170 | + name: enterprise-tests |
| 171 | + |
| 172 | + - name: "unpack firefox build" |
| 173 | + id: unpack |
| 174 | + run: | |
| 175 | + tar xf ./obj-*/dist/firefox-*.tar* |
| 176 | + RUNTIME_PATH=$(find . -type f -name "firefox") |
| 177 | + echo "runtime_path=$RUNTIME_PATH" >> "$GITHUB_OUTPUT" |
| 178 | +
|
| 179 | + - name: "install python" |
| 180 | + run: | |
| 181 | + python3 -m venv venv_tests |
| 182 | +
|
| 183 | + - name: "install deps" |
| 184 | + run: | |
| 185 | + curl -sSL https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz | tar -zxf - |
| 186 | + . venv_tests/bin/activate |
| 187 | + pip3 install -r requirements.txt |
| 188 | +
|
| 189 | + - name: "run tests" |
| 190 | + run: | |
| 191 | + RUNTIME_VERSION=$(${{ steps.unpack.outputs.runtime_path }} --version | awk '{ print $3 }') |
| 192 | + sed -e "s/#RUNTIME_VERSION#/${RUNTIME_VERSION}/g" < expectations.json.in > expectations.json |
| 193 | + mkdir -p ./profiles/ |
| 194 | + . venv_tests/bin/activate |
| 195 | + python3 test_firefox_start.py expectations.json ${{ steps.unpack.outputs.runtime_path }} $PWD/geckodriver $PWD/profiles/ |
| 196 | +
|
105 | 197 | windows-build-vm: |
106 | 198 | runs-on: ubuntu-24.04 |
107 | 199 | environment: Credentials |
@@ -151,6 +243,61 @@ jobs: |
151 | 243 | gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
152 | 244 | github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
153 | 245 |
|
| 246 | + windows-test-vm: |
| 247 | + runs-on: ubuntu-24.04 |
| 248 | + environment: Credentials |
| 249 | + needs: [ windows-build-opt ] |
| 250 | + outputs: |
| 251 | + instance_name: ${{ steps.create_vm.outputs.instance_name }} |
| 252 | + |
| 253 | + permissions: |
| 254 | + contents: 'read' |
| 255 | + id-token: 'write' |
| 256 | + |
| 257 | + steps: |
| 258 | + - uses: actions/checkout@v5 |
| 259 | + with: |
| 260 | + sparse-checkout: | |
| 261 | + .github/actions/ |
| 262 | + sparse-checkout-cone-mode: false |
| 263 | + |
| 264 | + - id: create_vm |
| 265 | + uses: ./.github/actions/create-vm |
| 266 | + with: |
| 267 | + instance_kind: "windows-test" |
| 268 | + gcp_machine_type: "c4d-standard-2" |
| 269 | + gcp_provisioning_model: "STANDARD" |
| 270 | + gcp_disk_size: "100" |
| 271 | + gcp_disk_source: "disk-2025-dc-v20250813-20250902102015" |
| 272 | + gcp_metadata_startup: "--metadata-from-file=windows-startup-script-ps1=./repo-checkout/.github/workflows/windows-startup.ps1" |
| 273 | + extra_labels: "test,WinNative" |
| 274 | + gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
| 275 | + github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
| 276 | + |
| 277 | + windows-test-vm-clean: |
| 278 | + runs-on: ubuntu-24.04 |
| 279 | + environment: Credentials |
| 280 | + needs: [ windows-test-vm, windows-test ] |
| 281 | + if: "always()" |
| 282 | + |
| 283 | + permissions: |
| 284 | + contents: 'read' |
| 285 | + id-token: 'write' |
| 286 | + |
| 287 | + steps: |
| 288 | + - uses: actions/checkout@v5 |
| 289 | + with: |
| 290 | + sparse-checkout: | |
| 291 | + .github/actions/ |
| 292 | + sparse-checkout-cone-mode: false |
| 293 | + |
| 294 | + - id: delete_vm |
| 295 | + uses: ./.github/actions/delete-vm |
| 296 | + with: |
| 297 | + instance_name: ${{ needs.windows-test-vm.outputs.instance_name }} |
| 298 | + gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
| 299 | + github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
| 300 | + |
154 | 301 | windows-build-opt: |
155 | 302 | runs-on: [ self-hosted, WinCross, X64 ] |
156 | 303 | needs: windows-build-vm |
@@ -184,6 +331,49 @@ jobs: |
184 | 331 | path: obj-*/dist/firefox-*.en-US.win64.zip |
185 | 332 | compression-level: 0 |
186 | 333 |
|
| 334 | + windows-test: |
| 335 | + runs-on: [self-hosted, WinNative, X64] |
| 336 | + needs: [ windows-test-vm, package-tests ] |
| 337 | + |
| 338 | + steps: |
| 339 | + - name: "download firefox build" |
| 340 | + uses: actions/download-artifact@v5 |
| 341 | + with: |
| 342 | + name: firefox-windows-amd64 |
| 343 | + |
| 344 | + - name: "download enterprise tests" |
| 345 | + uses: actions/download-artifact@v5 |
| 346 | + with: |
| 347 | + name: enterprise-tests |
| 348 | + |
| 349 | + - name: "unpack firefox build" |
| 350 | + id: unpack |
| 351 | + run: | |
| 352 | + $zipFile = Get-ChildItem -Path .\obj-*\dist\firefox-*.win64.zip | Select-Object -First 1 -ExpandProperty FullName |
| 353 | + C:\mozilla-build\bin\unzip.exe $zipFile |
| 354 | +
|
| 355 | + - name: "install python" |
| 356 | + run: | |
| 357 | + python3 -m venv venv_tests |
| 358 | +
|
| 359 | + - name: "install deps" |
| 360 | + run: | |
| 361 | + Invoke-WebRequest -Uri https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-win32.zip -OutFile geckodriver-v0.36.0-win32.zip |
| 362 | + C:\mozilla-build\bin\unzip.exe geckodriver-v0.36.0-win32.zip |
| 363 | + . venv_tests\Scripts\activate |
| 364 | + pip3 install -r requirements.txt |
| 365 | +
|
| 366 | + - name: "run tests" |
| 367 | + run: | |
| 368 | + $firefoxPath = Get-ChildItem -Path .\firefox\firefox.exe | Select-Object -First 1 -ExpandProperty FullName |
| 369 | + $geckodriverPath = Join-Path -Path $PWD -ChildPath "geckodriver.exe" |
| 370 | + $profilesPath = Join-Path -Path $PWD -ChildPath "profiles" |
| 371 | + $runtimeVersion = (Get-Content ".\firefox\application.ini") -match "^Version=" | ForEach-Object { $_.Split('=')[1] } |
| 372 | + (Get-Content expectations.json.in) -replace '#RUNTIME_VERSION#', $runtimeVersion | Set-Content expectations.json |
| 373 | + New-Item -ItemType Directory -Force -Path .\profiles |
| 374 | + . venv_tests\Scripts\activate |
| 375 | + python3 test_firefox_start.py expectations.json $firefoxPath $geckodriverPath $profilesPath |
| 376 | +
|
187 | 377 | macOS-build-vm: |
188 | 378 | runs-on: ubuntu-24.04 |
189 | 379 | environment: Credentials |
@@ -268,3 +458,50 @@ jobs: |
268 | 458 | name: firefox-macOS-aarch64 |
269 | 459 | path: obj-*/dist/firefox-*.dmg* |
270 | 460 | compression-level: 0 |
| 461 | + |
| 462 | + macOS-test: |
| 463 | + runs-on: [self-hosted, MacNative, ARM64] |
| 464 | + needs: [ macOS-build-opt, package-tests ] |
| 465 | + |
| 466 | + steps: |
| 467 | + - name: "download firefox build" |
| 468 | + uses: actions/download-artifact@v5 |
| 469 | + with: |
| 470 | + name: firefox-macOS-aarch64 |
| 471 | + |
| 472 | + - name: "download enterprise tests" |
| 473 | + uses: actions/download-artifact@v5 |
| 474 | + with: |
| 475 | + name: enterprise-tests |
| 476 | + |
| 477 | + - name: "attach" |
| 478 | + id: attach |
| 479 | + run: | |
| 480 | + MOUNT_DIR=$(hdiutil attach ./obj-aarch64-apple-darwin/dist/firefox-144.0a1.en-US.mac.dmg | grep "/Volumes" | sed -e "s/.*\/Volumes/\/Volumes/g") |
| 481 | + ls -hal "${MOUNT_DIR}"/Firefox.app/Contents/MacOS/firefox |
| 482 | + echo "mount_dir='${MOUNT_DIR}'" >> "$GITHUB_OUTPUT" |
| 483 | + RUNTIME_PATH=$(find "${MOUNT_DIR}" -type f -name "firefox") |
| 484 | + echo "runtime_path=$RUNTIME_PATH" >> "$GITHUB_OUTPUT" |
| 485 | +
|
| 486 | + - name: "install python" |
| 487 | + run: | |
| 488 | + python3 -m venv venv_tests |
| 489 | +
|
| 490 | + - name: "install deps" |
| 491 | + run: | |
| 492 | + curl -sSL https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-macos-aarch64.tar.gz | tar -xf - |
| 493 | + . venv_tests/bin/activate |
| 494 | + pip3 install -r requirements.txt |
| 495 | +
|
| 496 | + - name: "run tests" |
| 497 | + run: | |
| 498 | + RUNTIME_VERSION=$(${{ steps.attach.outputs.runtime_path }} --version | awk '{ print $3 }') |
| 499 | + sed -e "s/#RUNTIME_VERSION#/${RUNTIME_VERSION}/g" < expectations.json.in > expectations.json |
| 500 | + mkdir -p ./profiles/ |
| 501 | + . venv_tests/bin/activate |
| 502 | + python3 test_firefox_start.py expectations.json ${{ steps.attach.outputs.runtime_path }} $PWD/geckodriver $PWD/profiles/ |
| 503 | +
|
| 504 | + - name: "detach" |
| 505 | + if: "always()" |
| 506 | + run: | |
| 507 | + hdiutil unmount ${{ steps.attach.outputs.mount_dir }} |
0 commit comments