-
Notifications
You must be signed in to change notification settings - Fork 30
87 lines (87 loc) · 3.22 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: test
on: push
jobs:
StoryBook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Prepare config
run: cp contrib/emr-config/config.local.js contrib/emr-config/config.js
- name: Prepare secrets
run: echo AIDBOX_LICENSE=${AIDBOX_LICENSE} > .env
- name: Install deps
run: yarn install
- run: yarn extract
- run: yarn compile
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: yarn build-storybook --quiet
- name: Test storybook
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on tcp:127.0.0.1:6006 && yarn test-storybook"
- name: Publish to Chromatic
uses: chromaui/action@v1
env:
NODE_OPTIONS: "--max_old_space_size=4096"
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true
Tests:
env:
AIDBOX_LICENSE: ${{ secrets.AIDBOX_LICENSE }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Prepare config
run: cp contrib/emr-config/config.local.js contrib/emr-config/config.js
- name: Prepare secrets
run: echo AIDBOX_LICENSE=${AIDBOX_LICENSE} > .env
- name: Install deps
run: yarn install
- run: yarn extract
- run: yarn compile
- name: Check types
run: yarn typecheck
- name: Create deps dir
run: mkdir -p zenproject/zen-packages && chmod 0777 zenproject/zen-packages
- name: Run aidbox
run: make up
- name: Show logs
if: ${{ failure() }}
run: docker-compose logs
- name: Run tests
run: yarn test --silent
TestScript:
env:
AIDBOX_LICENSE: ${{ secrets.AIDBOX_LICENSE }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare secrets
run: echo AIDBOX_LICENSE=${AIDBOX_LICENSE} > .env
- name: Create deps dir
run: mkdir -p zenproject/zen-packages && chmod 0777 zenproject/zen-packages
- name: Build TestScript files from FSH sources
run: make kaitenzushi
- name: Run tests
run: make testscript
- name: Show logs
if: ${{ failure() }}
run: docker compose -f docker-compose.testscript.yaml logs testscript sdc