-
Notifications
You must be signed in to change notification settings - Fork 20
59 lines (49 loc) · 1.33 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Test
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
- auto_merge_enabled
push:
branches:
- main
env:
FORCE_COLOR: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
name: Web Test Runner
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Configures the node version used on GitHub-hosted runners
- name: Configure node version
uses: actions/setup-node@v3
with:
node-version: '18'
cache: npm
- uses: google/wireit@setup-github-actions-caching/v1
- name: Install dependencies
run: npm ci --prefer-offline
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Lint
id: lint
run: npm run lint
- name: Run tests
run: npm test
if: ${{ always() }}
- name: JUnit Report Action
uses: mikepenz/[email protected]
if: ${{ always() }}
with:
fail_on_failure: true # fail the actions run if the tests failed
report_paths: test-results/test-results.xml
- name: Validate Build
run: npm run build
- name: Print manifest
run: jq --color-output . custom-elements.json