File tree Expand file tree Collapse file tree
.github/actions/playwright Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Setup Playwright
2+ description : UDS Playwright Setup
3+
4+ inputs :
5+ testDir :
6+ description : The directory that contains the playwright tests
7+ default : tests
8+
9+ runs :
10+ using : composite
11+ steps :
12+ - name : Get installed Playwright version
13+ id : playwright-version
14+ run : echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').packages['node_modules/@playwright/test'].version)")" >> $GITHUB_ENV
15+ working-directory : ./${{ inputs.testDir }}
16+ shell : bash
17+
18+ - name : Cache playwright binaries
19+ uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
20+ id : playwright-cache
21+ with :
22+ path : |
23+ ~/.cache/ms-playwright
24+ key : ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
25+
26+ - name : Install npm packages
27+ run : npm ci
28+ working-directory : ./${{ inputs.testDir }}
29+ shell : bash
30+
31+ - name : Install playwright (and its dependencies) if needed
32+ run : npx playwright install --with-deps
33+ if : steps.playwright-cache.outputs.cache-hit != 'true'
34+ working-directory : ./${{ inputs.testDir }}
35+ shell : bash
You can’t perform that action at this time.
0 commit comments