Skip to content

Commit

Permalink
👷 (e2e) testing !turbo on lhci, test:e2e [b]
Browse files Browse the repository at this point in the history
Moved the installs higher, but I think
 this was misleading as the website as not getting rebuilt at
 all in this, it was the prior cache that was coming through
 and then `lhci` and `test:e2e` respctively were _not_ cached
 correctly. But see if this speeds things up at all.
Ideally we put `turbo` back.
  • Loading branch information
JeromeFitz committed Jul 10, 2023
1 parent d01f670 commit 143329e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
47 changes: 25 additions & 22 deletions .github/actions/e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@ runs:
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}

- name: '🎭 Playwright: Install (!cache)'
id: e2e-dependencies-playwright
shell: bash
# run: pnpm playwright install --with-deps
run: npx install playwright --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: '🎭 Playwright: Install (cache)'
id: e2e-dependencies-playwright-cache
shell: bash
# run: pnpm playwright install-deps
run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'

- name: '💡 Lighthouse: Install'
id: e2e-dependencies-lighthouse
shell: bash
# run: pnpm add @lhci/cli -g
run: npx install @lhci/cli -g

# @todo(gh-actions) Separate `main` from PR
- name: '🧪 Test: Build'
id: e2e-build
Expand All @@ -69,12 +89,6 @@ runs:
# restore-keys: |
# ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-

- name: '💡 Lighthouse: Install'
id: e2e-dependencies-lighthouse
shell: bash
# run: pnpm add @lhci/cli -g
run: npx install @lhci/cli -g

- name: '💡 Lighthouse: ${{ inputs.WEBSITE }}'
id: test-lighthouse
shell: bash
Expand All @@ -83,22 +97,9 @@ runs:
TURBO_TEAM: ${{ inputs.TURBO_TEAM }}
TURBO_TOKEN: ${{ inputs.TURBO_TOKEN }}
VERCEL_ENV: ${{ inputs.VERCEL_ENV }}
# run: pnpm turbo run lhci --filter="${{ inputs.WEBSITE }}" --cache-dir=".cache-turbo"
run: |
pnpm turbo run lhci --filter="${{ inputs.WEBSITE }}" --cache-dir=".cache-turbo"
- name: '🎭 Playwright: Install (!cache)'
id: e2e-dependencies-playwright
shell: bash
# run: pnpm playwright install --with-deps
run: npx install playwright --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: '🎭 Playwright: Install (cache)'
id: e2e-dependencies-playwright-cache
shell: bash
# run: pnpm playwright install-deps
run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
pnpm --filter "${{ inputs.WEBSITE }}" lhci
- name: '🎭 Playwright: ${{ inputs.WEBSITE }}'
id: e2e-test
Expand All @@ -107,7 +108,9 @@ runs:
TURBO_TEAM: ${{ inputs.TURBO_TEAM }}
TURBO_TOKEN: ${{ inputs.TURBO_TOKEN }}
VERCEL_ENV: ${{ inputs.VERCEL_ENV }}
run: pnpm turbo run test:e2e --filter="${{ inputs.WEBSITE }}" --cache-dir=".cache-turbo"
# run: pnpm turbo run test:e2e --filter="${{ inputs.WEBSITE }}" --cache-dir=".cache-turbo"
run: |
pnpm --filter "${{ inputs.WEBSITE }}" test:e2e
# - name: '🎭 Playwright: Upload'
# id: e2e-upload
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"prepare": "is-ci || husky install",
"semantic-release": "pnpm run semantic-release:mono",
"semantic-release:dry": "pnpm --filter jeromefitzgerald.com -r --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo --dry-run",
"semantic-release:mono": "pnpm --filter jeromefitzgerald.com -r --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo",
"start": "pnpm turbo run start --filter=\"jeromefitzgerald.com\""
"semantic-release:mono": "pnpm --filter jeromefitzgerald.com -r --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo"
},
"dependencies": {
"@jeromefitz/conventional-gitmoji": "3.3.6",
Expand Down
4 changes: 1 addition & 3 deletions packages/playwright-config/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ const config = ({ basePath = '', port, website = 'jeromefitzgerald.com' }) => {
},

webServer: {
// command: `cd ../.. && pnpm turbo run dev --filter="${website}"`,
// command: 'pnpm run dev',
command: 'pnpm run start',
command: `pnpm --filter ${website} start`,
url: baseURL,
reuseExistingServer: !process.env.CI,
},
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"outputs": ["storybook-static/**"]
},
"test:e2e": {
"dependsOn": ["^build", "jeromefitzgerald.com#build"],
"dependsOn": ["^build", "^jeromefitzgerald.com#build"],
"inputs": ["src/e2e/**"],
"outputs": ["e2e-report/**", "e2e-results/**"]
},
Expand Down

0 comments on commit 143329e

Please sign in to comment.