-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (58 loc) · 1.56 KB
/
pr.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
name: Pull-Request CI
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
- name: npm build
run: |
if [[ $GITHUB_BASE_REF ]]
then
export NX_BASE=remotes/origin/$GITHUB_BASE_REF
else
export NX_BASE=$(git rev-parse HEAD~1)
fi
echo "Base => $NX_BASE"
npm run affected:build -- --base=$NX_BASE
env:
CI: true
- name: npm test
run: |
if [[ $GITHUB_BASE_REF ]]
then
export NX_BASE=remotes/origin/$GITHUB_BASE_REF
else
export NX_BASE=$(git rev-parse HEAD~1)
fi
echo "Base => $NX_BASE"
npm run affected:test -- --base=$NX_BASE
env:
CI: true
- name: Test with Coverage
run: npm run client:coverage
- uses: codecov/[email protected]
with:
token: ${{secrets.CODE_COV_TOKEN}}
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v1
with:
node_version: 13.x
- name: Run markdownlint
run: npm run markdown:lint
- name: Run cspell
run: npm run cspell:lint