-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (55 loc) · 1.67 KB
/
test-build.yaml
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: Test Build
on: [pull_request, workflow_dispatch]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install jshint -g
- name: Run jshint
run: jshint -c .jshintrc lib/
coverage:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Clone smartsheet/smartsheet-sdk-tests PUBLIC repository
uses: GuillaumeFalourd/clone-github-repo-action@v2
with:
owner: 'smartsheet'
repository: 'smartsheet-sdk-tests'
- name: Setup mock API
run: |
smartsheet-sdk-tests/ci_scripts/install_wiremock.sh
smartsheet-sdk-tests/ci_scripts/start_wiremock.sh
- name: Run coverage on Node ${{ matrix.node-version }}
run: npm run coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
parallel: true
finish:
needs: coverage
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true