-
Notifications
You must be signed in to change notification settings - Fork 3
93 lines (91 loc) · 2.67 KB
/
main.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
88
89
90
91
92
93
name: "Build Status"
on:
- push
- pull_request
jobs:
lint-spotlight-client:
name: Lint Spotlight Client
runs-on: ubuntu-latest
defaults:
run:
working-directory: spotlight-client
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- run: yarn lint
test-spotlight-client:
name: Test Spotlight Client
runs-on: ubuntu-latest
defaults:
run:
working-directory: spotlight-client
env:
REACT_APP_API_URL: http://localhost:3002
REACT_APP_ENABLED_TENANTS: US_ID,US_ME,US_ND,US_PA,US_TN
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- name: install test server dependencies
run: yarn install --frozen-lockfile
working-directory: spotlight-api
- run: yarn test --coverage --forceExit --runInBand
- name: Coveralls
uses: coverallsapp/github-action@master
with:
flag-name: spotlight-client
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: spotlight-client/coverage/lcov.info
lint-spotlight-api:
name: Lint Spotlight API
runs-on: ubuntu-latest
defaults:
run:
working-directory: spotlight-api
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- run: yarn lint
test-spotlight-api:
name: Test Spotlight API
runs-on: ubuntu-latest
defaults:
run:
working-directory: spotlight-api
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- run: yarn test --coverage --runInBand
- name: Coveralls
uses: coverallsapp/github-action@master
with:
flag-name: spotlight-api
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: spotlight-api/coverage/lcov.info
finish-coveralls:
name: Finish Coveralls
runs-on: ubuntu-latest
needs: [test-spotlight-client, test-spotlight-api]
steps:
- name: Coveralls Parallel Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true