-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: better and faster e2e tests
- Loading branch information
Showing
5 changed files
with
100 additions
and
86 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: Tests | ||
|
||
# this should run w cache now 3 | ||
on: | ||
push: | ||
branches: | ||
|
@@ -24,9 +24,9 @@ concurrency: | |
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PLAYWRIGHT_BROWSERS_PATH: 0 | ||
strategy: | ||
matrix: | ||
browser: [webkit, firefox, chromium] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -40,23 +40,34 @@ jobs: | |
node-version: 22 | ||
cache: 'pnpm' | ||
|
||
- uses: actions/[email protected] | ||
id: playwright-cache | ||
with: | ||
path: | | ||
~/.cache/ms-playwright | ||
key: ${{ runner.os }}-${{ matrix.browser }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
|
||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Type Check | ||
run: pnpm ts | ||
|
||
- name: Install Playwright browsers | ||
run: pnpm exec playwright install --with-deps | ||
- name: Run unit tests | ||
run: pnpm vitest run --coverage | ||
|
||
- run: pnpm exec playwright install --with-deps ${{ matrix.browser }} | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
|
||
- name: Run e2e tests | ||
run: | | ||
pnpm build | ||
pnpm test:ci-e2e | ||
- run: pnpm exec playwright install-deps ${{ matrix.browser }} | ||
if: steps.playwright-cache.outputs.cache-hit == 'true' | ||
|
||
- name: Run unit tests | ||
run: pnpm test:ci | ||
- name: Build | ||
run: pnpm vite build | ||
|
||
- name: Run e2e tests | ||
run: pnpm playwright test --project="${{ matrix.browser }}" | ||
|
||
- name: Coverage | ||
uses: davelosert/[email protected] | ||
if: ${{ always() }} | ||
if: ${{ matrix.browser == 'webkit' && success() }} |
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
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
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
Oops, something went wrong.