-
Notifications
You must be signed in to change notification settings - Fork 38
67 lines (62 loc) · 1.91 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
59
60
61
62
63
64
65
66
67
name: Test
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/test.yml
- 'packages/**'
- 'apps/storybook/**'
permissions:
checks: write
# Required to put a comment into the pull-request
pull-requests: write
jobs:
test:
name: Build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/gh-setup
- name: Build
run: yarn build
- name: Types
run: yarn types:react
- name: Test
run: yarn test
- name: 'Report Coverage'
if: success() || failure()
uses: davelosert/vitest-coverage-report-action@v2
- name: Publish unit test report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: 'test-report.xml'
detailed_summary: true
check_name: Unit Test Report
check_annotations: true
check_title_template: '{{FILE_NAME}} / {{TEST_NAME}}'
- name: Test CLI (create tokens, then build the theme)
run: yarn test:cli
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build storybook
run: yarn build:storybook
- name: Run Storybook tests
run: yarn test:storybook
- name: Replace relative paths in test report
uses: jacobtomlinson/gha-find-replace@v3
if: success() || failure()
with:
include: 'apps/storybook/test-report.xml'
find: '../../'
replace: ''
regex: false
- name: Publish Storybook test report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: 'apps/storybook/test-report.xml'
detailed_summary: true
check_name: Storybook Test Report
check_annotations: true
check_title_template: '{{FILE_NAME}} / {{TEST_NAME}}'