wait for MAAS boot resources #828
Workflow file for this run
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.*" | |
- ci-sitespeed-setup-maas-github-action | |
jobs: | |
run-sitespeed: | |
name: Run sitespeed.io | |
runs-on: ubuntu-22.04 | |
env: | |
MAAS_DOMAIN: "127.0.0.1" | |
steps: | |
- uses: actions/checkout@main | |
- name: Setup MAAS | |
uses: canonical/setup-maas@main | |
with: | |
maas-url: "http://${{env.MAAS_DOMAIN}}:5240/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: Login to MAAS | |
run: | | |
export API_KEY=`sudo maas apikey --username=admin` | |
maas login admin http://localhost:5240/MAAS $API_KEY | |
- 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 |