Skip to content

Commit

Permalink
fix: add playwright dependency & cache yarn in Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bmstefanski committed Dec 24, 2023
1 parent 312cebd commit 660da12
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "${{ env.node_version }}"
cache: "yarn"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "${{ env.node_version }}"
cache: "yarn"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Playwright Browsers
Expand Down
7 changes: 4 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"lodash": "^4.17.21",
"next": "^14.0.3",
"next-compose-plugins": "^2.2.1",
"playwright": "^1.40.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwind-merge": "^2.0.0",
Expand All @@ -62,6 +63,8 @@
"@babel/plugin-syntax-flow": "^7.23.3",
"@babel/plugin-transform-optional-chaining": "^7.23.4",
"@babel/plugin-transform-react-jsx": "^7.23.4",
"@enterprise-commerce/eslint-config-custom": "*",
"@enterprise-commerce/tsconfig": "*",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/resources": "1.18.1",
"@opentelemetry/sdk-node": "0.45.1",
Expand All @@ -82,8 +85,6 @@
"postcss": "^8.4.31",
"postinstall-postinstall": "^2.1.0",
"storybook": "^7.5.3",
"tailwindcss": "^3.3.5",
"@enterprise-commerce/tsconfig": "*",
"@enterprise-commerce/eslint-config-custom": "*"
"tailwindcss": "^3.3.5"
}
}
14 changes: 14 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14049,6 +14049,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.40.0.tgz#82f61e5504cb3097803b6f8bbd98190dd34bdf14"
integrity sha512-fvKewVJpGeca8t0ipM56jkVSU6Eo0RmFvQ/MaCQNDYm+sdvKkMBBWTE1FdeMqIdumRaXXjZChWHvIzCGM/tA/Q==

[email protected]:
version "1.40.1"
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.40.1.tgz#442d15e86866a87d90d07af528e0afabe4c75c05"
integrity sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==

[email protected]:
version "1.40.0"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.40.0.tgz#2a1824b9fe5c4fe52ed53db9ea68003543a99df0"
Expand All @@ -14067,6 +14072,15 @@ playwright@^1.14.0:
optionalDependencies:
fsevents "2.3.2"

playwright@^1.40.1:
version "1.40.1"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.40.1.tgz#a11bf8dca15be5a194851dbbf3df235b9f53d7ae"
integrity sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==
dependencies:
playwright-core "1.40.1"
optionalDependencies:
fsevents "2.3.2"

pluralize@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
Expand Down

0 comments on commit 660da12

Please sign in to comment.