forked from abhinaba-ghosh/playwright-lighthouse
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (24 loc) · 839 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Test
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- run: npm install
- name: Determine playwright version from package.json
id: get_playwright_version
run: |
playwright_version=$(jq -r '.devDependencies["@axe-core/playwright"]' package.json | sed 's/\^//g')
echo "Playwright version: $playwright_version"
echo "playwright_version=$playwright_version" >> $GITHUB_OUTPUT
- run: npx playwright@${{ steps.get_playwright_version.outputs.playwright_version }} install --with-deps chromium
- run: npm run lint
- run: npm test