1
- name : Run test suite for React component library
1
+ name : Test React components library
2
2
3
3
on :
4
4
pull_request :
@@ -12,8 +12,8 @@ concurrency:
12
12
cancel-in-progress : true
13
13
14
14
jobs :
15
- react-components-test :
16
- name : Test suite run
15
+ jest-unit-tests :
16
+ name : Jest unit tests
17
17
runs-on : ubuntu-latest
18
18
19
19
steps :
36
36
- name : Run test suite with npm script
37
37
run : npm run test:ci
38
38
working-directory : ./packages/react-components
39
+
40
+ playwright-accessibility-tests :
41
+ name : Playwright accessibility tests
42
+ runs-on : ubuntu-latest
43
+
44
+ steps :
45
+ - name : Checkout code
46
+ uses : actions/checkout@v4
47
+
48
+ - name : Read .nvmrc
49
+ run : echo "GITHUB_NVMRC_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
50
+ working-directory : ./packages/react-components
51
+
52
+ - name : Set up Node.js
53
+ uses : actions/setup-node@v4
54
+ with :
55
+ node-version : ${{ env.GITHUB_NVMRC_VERSION }}
56
+
57
+ - name : Install dependencies
58
+ run : npm install
59
+ working-directory : ./packages/react-components
60
+
61
+ - name : Install Playwright
62
+ run : npx playwright install --with-deps
63
+ working-directory : ./packages/react-components
64
+
65
+ - name : Build Storybook
66
+ run : npm run storybook-build
67
+ working-directory : ./packages/react-components
68
+
69
+ - name : Serve Storybook and run tests
70
+ run : |
71
+ npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
72
+ "npx http-server storybook-static --port 6006 --silent" \
73
+ "npx wait-on tcp:6006 && npm run test-storybook:ci"
74
+ working-directory : ./packages/react-components
0 commit comments