-
-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (101 loc) · 2.75 KB
/
build.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
- 'releases/*'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
max-parallel: 2
matrix:
node-version:
- 10.x
- 11.x
- 12.x
- 14.x
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Setup PNPM
uses: pnpm/action-setup@v1.2.1
with:
version: 4.11.1
- name: Install Dependencies
run: pnpm i
- name: Build project
run: |
pnpm run build --if-present
- name: Run tests
run: |
pnpm run test:all --if-present
- name: Check
run: |
pnpm run check:all --if-present
- name: Coveralls
uses: coverallsapp/github-action@master
if: hashFiles('./coverage/lcov.info') != ''
env:
NODE_COVERALLS_DEBUG: 1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: run-${{ matrix.node-version }}
- name: Circular dependency check
uses: gerrit0/circular-dependency-check@v1
with:
entry: dist/index.js
- name: coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: actions ${{ matrix.node-version }}
file: ./coverage/coverage-final.json
fail_ci_if_error: true
verbose: true
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Node.js
uses: actions/setup-node@v1
- name: Install Dependencies
run: npm install
- name: Build Dependencies
run: npm run all
- uses: ./
with:
mode: 'unique'
jsonPath: '$.african[*]'
jsonFields: 'text'
sourceFile: ./data/african_proverbs.json
targetPath: ./data
targetFile: african_proverbs_unique.json
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Add images pulled from headless browser to folder
commit_options: '--no-verify --signoff'
finish:
needs: test
runs-on: ubuntu-latest
if: hashFiles('./coverage/lcov.info') != ''
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true