-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (44 loc) · 1.33 KB
/
CI.yml
File metadata and controls
48 lines (44 loc) · 1.33 KB
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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v1
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm run cover
env:
TESTPLAYER: "76561198028175941"
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v2.6.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
coverageLocations: |
./coverage/lcov.info:lcov
TESTPLAYER: "76561198028175941"
with:
coverageCommand: npm run cover
- uses: codecov/codecov-action@v1
with:
file: ./coverage/lcov.info
- uses: actions/upload-artifact@v2
with:
name: dist
path: ./dist/