-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (52 loc) · 1.43 KB
/
ci.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
name: ci
on:
pull_request:
branches:
- master
workflow_call:
merge_group:
jobs:
unit-test:
runs-on: ubuntu-latest
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run unit-test
integration-test:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm ci
- name: Start localstack
run: docker compose -f docker-compose.ci.yml up -d
- name: Wait for localstack to be running
run: sleep 15s
# curl fails with exit code 52 for some reason
# run: |
# until [ "$(curl -s "http://localhost:4566/" | jq '.status == "running"')" ]; do
# sleep 1
# done
- run: chmod 500 create-localstack-resources.sh && ./create-localstack-resources.sh
- run: npm run integration-test
- name: extract logs
if: ${{ failure() }}
run: docker compose -f docker-compose.ci.yml logs > docker-compose.log
- name: upload logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: logs
path: docker-compose.log