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

Parallelize lighthouse ci #1126

Merged
merged 5 commits into from
Apr 12, 2023
Merged
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
30 changes: 22 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
env:
# The "default" npm is the one that ships with a given version of node.
# For more: https://nodejs.org/en/download/releases/
IS_MRT_NODE: ${{ matrix.node == 16 && matrix.npm == 8 }}
IS_DEFAULT_NPM: ${{ matrix.node == 16 && matrix.npm == 8 || matrix.node == 18 && matrix.npm == 9 }}
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 9) }}
IS_LATEST_NPM: ${{ matrix.node == 16 && matrix.npm == 8 }}
steps:
- name: Checkout
Expand All @@ -64,12 +63,6 @@ jobs:
- name: Run unit tests
uses: "./.github/actions/unit_tests"

- name: Run Lighthouse CI on the PWA
# lighthouse ci doesn't work on node 18 at this time
# https://github.com/GoogleChrome/lighthouse-ci/issues/862
if: env.IS_MRT_NODE == 'true'
uses: "./.github/actions/lighthouse_ci"

- name: Smoke test scripts
if: env.IS_DEFAULT_NPM == 'true'
uses: "./.github/actions/smoke_tests"
Expand Down Expand Up @@ -303,3 +296,24 @@ jobs:
uses: actions/upload-artifact@v3
with:
path: packages/pwa-kit-create-app/local-npm-repo/verdaccio.log
lighthouse:
strategy:
fail-fast: false
matrix:
node: [16] # Should match node version supported by MRT.
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm

- name: Setup Ubuntu Machine
uses: "./.github/actions/setup_ubuntu"

- name: Run Lighthouse CI on the PWA
uses: "./.github/actions/lighthouse_ci"