-
Notifications
You must be signed in to change notification settings - Fork 12
85 lines (71 loc) · 2.02 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
name: MAIN
# Run on push only for main
# Otherwise it may trigger concurrently `push & pull_request` on PRs.
on:
push:
branches:
- main
paths-ignore:
- '*.md'
- '.vscode/**'
- 'docs/**'
- 'examples/**'
- 'LICENSE'
- 'tools/**'
- 'graphs/**'
pull_request:
paths-ignore:
- '*.md'
- '.vscode/**'
- 'docs/**'
- 'examples/**'
- 'LICENSE'
- 'tools/**'
- 'graphs/**'
workflow_dispatch:
jobs:
#
# Development Verification
#
development:
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout Code 🚪
uses: actions/checkout@v2
- name: Setup Node ⚙️
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Cache Deps 🛢️
id: cache-deps
uses: actions/cache@v2
with:
path: ~/.cache
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: Install Dependencies 🔧
run: yarn install --frozen-lockfile
- name: Get branch name
id: branch
run: echo ::set-output name=current_branch::${GITHUB_REF#refs/*/}
- name: Prisma generate
run: yarn prisma:avidtrader-api:generate
- name: Run linter
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn lint:ci
- name: Run builder
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn build:ci
- name: Run tester
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn test:ci
- name: Run e2e
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn e2e:ci
- name: Combine coverage
run: |
NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn coverage:merge
- name: Push coverage to coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './coverage/lcov.combo.info'