fix: reserve range error state (#5357) #891
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
name: sitespeed.io | |
on: | |
push: | |
branches: | |
- main | |
- "3.*" | |
jobs: | |
run-sitespeed: | |
name: Run sitespeed.io | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
env: | |
MAAS_DOMAIN: localhost | |
MAAS_URL: http://localhost:5240 | |
steps: | |
- uses: actions/checkout@main | |
- name: Setup MAAS | |
uses: canonical/setup-maas@main | |
with: | |
maas-url: ${{ env.MAAS_URL }}/MAAS | |
use-maasdb-dump: true | |
maasdb-dump-url: https://github.com/canonical/maas-ui-testing/raw/main/db/maasdb-22.04-master-1000.dump | |
- name: Create MAAS admin | |
run: sudo maas createadmin --username=admin --password=test [email protected] | |
- name: Wait for MAAS | |
uses: nev7n/wait_for_response@v1 | |
with: | |
url: "http://${{env.MAAS_DOMAIN}}:5240/MAAS/r" | |
responseCode: 200 | |
timeout: 200000 | |
interval: 500 | |
- name: Login MAAS admin | |
run: | | |
# Retry admin login up to 5 times with 10s intervals to account for delays in MAAS becoming fully operational | |
for attempt in {1..5}; do | |
export API_KEY=$(sudo maas apikey --username=admin) | |
if maas login admin http://localhost:5240/MAAS $API_KEY; then | |
echo "Login successful." | |
break | |
else | |
echo "Login attempt $attempt failed. Retrying in 10 seconds..." | |
sleep 10 | |
fi | |
done | |
- name: Wait for MAAS boot resources | |
shell: bash | |
run: while [ $(maas admin boot-resources is-importing | cat) == "true" ]; do sleep 10; done; echo "syncing finished" | |
- name: Run sitespeed.io tests | |
run: yarn sitespeed:ci --browsertime.domain=${{env.MAAS_DOMAIN}} | |
- name: Upload results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sitespeed.io-results | |
path: sitespeed.io/results | |
- name: Create issue on failure | |
if: failure() | |
uses: JasonEtco/create-an-issue@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPO: ${{ github.repository }} | |
RUN_ID: ${{ github.run_id }} | |
WORKFLOW: ${{ github.workflow }} | |
with: | |
filename: .github/ISSUE_TEMPLATE/ci-failure.md | |
update_existing: true |