commerce/feat/header #29
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: Lighthouse | Quixer | |
on: pull_request | |
# Cancel in progress workflows on pull_requests. | |
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
# -- SHOPIFY CONFIG -- # | |
SHOPIFY_STOREFRONT_ACCESS_TOKEN: ${{ secrets.SHOPIFY_STOREFRONT_ACCESS_TOKEN }} | |
SHOPIFY_STORE_DOMAIN: ${{ secrets.SHOPIFY_STORE_DOMAIN }} | |
SHOPIFY_ADMIN_ACCESS_TOKEN: ${{ secrets.SHOPIFY_ADMIN_ACCESS_TOKEN }} | |
# -- SHOPIFY CONFIG -- # | |
# -- LHCI CONFIG -- # | |
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | |
# -- LHCI CONFIG -- # | |
# -- TURBO CACHE -- # | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
TURBO_REMOTE_ONLY: true | |
# -- TURBO CACHE -- # | |
jobs: | |
lhci: | |
name: Lighthouse | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set node version | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Set pnpm version | |
uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
version: 7 | |
- name: Cache node_modules | |
id: node-modules-cache | |
uses: actions/cache@v3 | |
with: | |
path: "**/node_modules" | |
key: node-modules-cache-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Install dependencies | |
if: steps.node-modules-cache.outputs.cache-hit != 'true' | |
run: pnpm install --no-frozen-lockfile | |
- name: pnpm build and start | |
run: | | |
pnpm build --filter=commerce | |
- name: run Lighthouse CI | |
run: | | |
pnpm install -g @lhci/[email protected] | |
pnpm lhci --filter=commerce |