Skip to content

Commit

Permalink
Get the Playwright version from package.json to build the Docker cach…
Browse files Browse the repository at this point in the history
…e id
  • Loading branch information
elchininet committed Sep 14, 2024
1 parent 6138a07 commit 84982ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ jobs:
with:
node-version: '18'
cache: 'pnpm'
- name: Set Playwright version
id: playwright-version
run: |
echo "playwright=$(cat package.json | grep @playwright/test | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')" >> $GITHUB_OUTPUT
- name: Cache Docker images
uses: ScribeMD/docker-cache@0.3.6
with:
key: docker-v1-${{ runner.os }}-${{ hashFiles('.hass/config/.HA_VERSION', '.playwright_docker_version') }}
key: docker-v1-${{ runner.os }}-${{ hashFiles('.hass/config/.HA_VERSION') }}-${{ steps.playwright-version.outputs.playwright }}
- name: Install deps
run: pnpm install
- name: E2E tests
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ jobs:
with:
node-version: '18'
cache: 'pnpm'
- name: Set Playwright version
id: playwright-version
run: |
echo "playwright=$(cat package.json | grep @playwright/test | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')" >> $GITHUB_OUTPUT
- name: Cache Docker images
uses: ScribeMD/docker-cache@0.3.6
with:
key: docker-v1-${{ runner.os }}-${{ hashFiles('.hass/config/.HA_VERSION', '.playwright_docker_version') }}
key: docker-v1-${{ runner.os }}-${{ hashFiles('.hass/config/.HA_VERSION') }}-${{ steps.playwright-version.outputs.playwright }}
- name: Install
run: pnpm install
- name: E2E tests
Expand Down

0 comments on commit 84982ee

Please sign in to comment.