-
-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into armcknight/feat(feedb…
…ack)/accessibility-audit
- Loading branch information
Showing
73 changed files
with
657 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,10 +94,73 @@ jobs: | |
name: DerivedData-Xcode | ||
- run: npm install -g [email protected] | ||
- name: Run Benchmarks in SauceLab | ||
id: run-benchmarks-in-sauce-lab | ||
continue-on-error: true | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
run: saucectl run --select-suite "${{matrix.suite}}" --config .sauce/benchmarking-config.yml --tags benchmark | ||
run: | | ||
set -o pipefail && saucectl run \ | ||
--select-suite "${{matrix.suite}}" \ | ||
--config .sauce/benchmarking-config.yml \ | ||
--tags benchmark \ | ||
--verbose \ | ||
2>&1 | tee output.log | ||
- name: Recovery - Extract Test ID from output | ||
id: should-retry-test | ||
if: ${{ steps.run-benchmarks-in-sauce-lab.outcome == 'failure' }} | ||
uses: actions/github-script@v7 | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const { execSync } = require('child_process'); | ||
console.log("Extracting test ID from output log"); | ||
const outputLog = fs.readFileSync('output.log', 'utf8'); | ||
// Lookup for the test ID in the output log | ||
// Note: The CLI output might change over time, so this might need to be updated. | ||
const match = outputLog.match(/https:\/\/app\.saucelabs\.com\/tests\/([^\s]+)/); | ||
const testId = match?.[1] ?? ''; | ||
if (!testId) { | ||
core.warning("No SauceLabs test ID found in CLI output, it might have changed, retrying..."); | ||
core.setOutput('RETRY_TEST', 'true'); | ||
return; | ||
} | ||
try { | ||
console.log(`Checking if the test exists in SauceLabs: ${testId}`); | ||
execSync(`saucectl jobs get ${testId}`, { | ||
env: process.env, | ||
stdio: 'inherit' | ||
}); | ||
console.log("Test exists but failed, not retrying."); | ||
core.setFailed('Test exists but failed'); | ||
} catch (error) { | ||
console.log("Failed to get job, retrying..."); | ||
core.setOutput('RETRY_TEST', 'true'); | ||
} | ||
- name: Run Benchmarks in SauceLab - Retry 1 | ||
id: run-benchmarks-in-sauce-lab-retry-1 | ||
if: ${{ steps.should-retry-test.outputs.RETRY_TEST == 'true' }} | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
run: | | ||
echo "::warning SauceLabs benchmark tests need to be retried" | ||
saucectl run \ | ||
--select-suite "${{matrix.suite}}" \ | ||
--config .sauce/benchmarking-config.yml \ | ||
--tags benchmark \ | ||
--verbose | ||
app-metrics: | ||
name: Collect app metrics | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.