-
Notifications
You must be signed in to change notification settings - Fork 124
56 lines (50 loc) · 1.43 KB
/
web-test-unit-tests.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
name: Unit tests for web code
on:
pull_request:
paths:
- ".github/workflows/web-test.yml"
- "web-admin/**"
- "web-auth/**"
- "web-common/**"
- "web-local/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Filter modified codepaths
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
admin:
- ".github/workflows/web-test.yml"
- "web-admin/**"
auth:
- ".github/workflows/web-test.yml"
- "web-auth/**"
local:
- ".github/workflows/web-test.yml"
- "web-local/**"
common:
- ".github/workflows/web-test.yml"
- "web-common/**"
- name: Set up NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
- name: NPM Install
run: npm install
# https://typicode.github.io/husky/how-to.html#ci-server-and-docker
env:
HUSKY: 0
- name: Run web-common unit tests
if: steps.filter.outputs.common == 'true'
run: npm run test -w web-common
- name: Run web-auth unit tests
if: steps.filter.outputs.auth == 'true'
run: npm run test -w web-auth
- name: Run storybook smoke tests
run: |-
npm run storybook:smoketest -w web-common