Skip to content

Commit

Permalink
feat: use pnpm instead of yarn to run playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
samshara committed Nov 27, 2024
1 parent f9fbd7f commit 586fa1b
Show file tree
Hide file tree
Showing 6 changed files with 9,878 additions and 7,481 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ on:
push:
branches:
- develop
- 'project/playwright'
pull_request:
branches:
- develop
- 'project/playwright'
# Allows you to run this workflow manually from the Actions tab
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
Expand All @@ -35,13 +33,13 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install
- name: Run Typecheck
run: yarn typecheck
run: pnpm typecheck
- name: Run Biome Check
run: yarn biome:ci
run: pnpm biome:ci
test-e2e:
name: E2E Tests
environment: 'test'
Expand All @@ -55,12 +53,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install -g yarn && yarn
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
run: pnpmx playwright install --with-deps
- name: Run Playwright Tests
run: yarn playwright test
run: pnpmx playwright test
- uses: actions/upload-artifact@v4
id: playwright-report-artifact
if: ${{ !cancelled() }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"storybook": "pnpm -F go-ui-storybook storybook",
"build-storybook": "pnpm -F go-ui-storybook build-storybook",
"chromatic": "pnpm -F go-ui-storybook chromatic",
"test:e2e": "yarn workspace e2e-tests playwright test"
"test:e2e": "pnpm -F e2e-tests playwright test"
},
"devDependencies": {
"knip": "^5.36.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Playwright Base URL
# Base URL for the application where Playwright will run tests
PLAYWRIGHT_APP_BASE_URL=
# User name of the test user for Playwright
PLAYWRIGHT_USER_NAME=
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"typecheck": "tsc --noEmit",
"test": "playwright test",
"format": "biome format ./tests/* ./utils/*",
"lint": "yarn biome lint ./tests/* ./utils/*",
"lint": "pnpm biome lint ./tests/* ./utils/*",
"biome:check": "biome check ./tests/* ./utils/*",
"biome:ci": "biome ci ./tests/* ./utils/*",
"biome:fix": "biome check --apply ./tests/* ./utils/*"
Expand Down
Loading

0 comments on commit 586fa1b

Please sign in to comment.