Skip to content

Commit

Permalink
devops: do not cache Playwright browsers (epicweb-dev#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Jun 20, 2023
1 parent ba56bf2 commit f732097
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,8 @@ jobs:
- name: 📥 Download deps
uses: bahmutov/npm-install@v1

- name: 📥 Store Playwright's Version
run: |
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
- name: 📥 Cache Playwright Browsers for Playwright's Versiont
id: cache-playwright-browsers
uses: actions/cache@v3
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}

- name: 📥 Setup Playwright
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
- name: 📥 Install Playwright Browsers
run: npm run test:e2e:install

- name: 🛠 Setup Database
run: npx prisma migrate deploy
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test:e2e:dev": "playwright test --ui",
"pretest:e2e:run": "npm run build",
"test:e2e:run": "cross-env CI=true playwright test",
"test:e2e:install": "npx playwright install chromium --with-deps",
"test:e2e:install": "npx playwright install --with-deps chromium",
"typecheck": "tsc",
"validate": "run-p \"test -- --run\" lint typecheck test:e2e:run"
},
Expand Down

0 comments on commit f732097

Please sign in to comment.