File tree Expand file tree Collapse file tree 4 files changed +496
-56
lines changed Expand file tree Collapse file tree 4 files changed +496
-56
lines changed Original file line number Diff line number Diff line change 1+ name : ' Setup and Cache Playwright'
2+ description : ' Installs playwright browsers and caches them.'
3+
4+ inputs :
5+ version :
6+ description : ' The version of playwright'
7+ required : true
8+
9+ outputs :
10+ cache-hit :
11+ description : ' Whether the cache was hit or not'
12+ value : ${{ steps.playwright-cache.outputs.cache-hit }}
13+
14+ runs :
15+ using : ' composite'
16+ steps :
17+ - name : Cache playwright browsers
18+ id : playwright-cache
19+ uses : actions/cache@v4
20+ with :
21+ key : playwright-browsers-${{ runner.os }}-${{ inputs.version }}
22+ path : ~/.cache/ms-playwright
23+
24+ - name : Install playwright browsers if they don't exist
25+ shell : bash
26+ run : npx playwright install --with-deps
27+ if : steps.playwright-cache.outputs.cache-hit != 'true'
28+
29+ - name : Install playwright dependencies if binaries exist
30+ shell : bash
31+ run : npx playwright install-deps
32+ if : steps.playwright-cache.outputs.cache-hit == 'true'
Original file line number Diff line number Diff line change 1+ name : Tests
2+ on :
3+ push :
4+ branches : [main]
5+ pull_request :
6+ branches : [main]
7+ jobs :
8+ test :
9+ timeout-minutes : 60
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : actions/setup-node@v4
14+ with :
15+ node-version : lts/*
16+ cache : ' npm'
17+ - name : Install dependencies
18+ run : npm ci --ignore-scripts
19+ - name : Build libs
20+ run : npm run build
21+ - name : Get playwright version
22+ run : echo "PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')" >> $GITHUB_ENV
23+ - name : Setup playwright
24+ uses : ./.github/actions/setup-playwright
25+ with :
26+ version : ${{ env.PLAYWRIGHT_VERSION }}
27+ - name : Tests
28+ run : npm run test
You can’t perform that action at this time.
0 commit comments