Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove 'Wait for MAAS' step from sitespeed workflow #5549

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
36 changes: 15 additions & 21 deletions .github/workflows/sitespeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
branches:
- main
- "3.*"
pull_request:
types: [opened, synchronize, reopened]
jobs:
run-sitespeed:
name: Run sitespeed.io
Expand All @@ -22,30 +24,22 @@ jobs:
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
sleep 30
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: Wait for MAAS boot resources
shell: bash
run: while [ $(maas admin boot-resources is-importing | cat) == "true" ]; do sleep 10; done; echo "syncing finished"
run: |
export API_KEY=`sudo maas apikey --username=admin`
maas login admin http://localhost:5240/MAAS $API_KEY
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
Expand Down
Loading