generated from BloomTech-Labs/labs-spa-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (43 loc) · 1.31 KB
/
ci.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
name: build
on:
pull_request:
push:
branches:
- main
jobs:
# A job to generate and publish code coverage
lint:
name: Run Lint on source
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14"
- run: npm install
- run: npm run lint
# A job to generate and publish code coverage
coverage:
name: Test and publish test coverage
# The OS on which the job will run
runs-on: ubuntu-latest
# The steps for the job, executed in sequence
steps:
# A GitHub action for checking out the current branch
- uses: actions/checkout@master
# A GitHub action to setup Node.js
- uses: actions/setup-node@master
with:
node-version: "12"
# Run the NPM install command before proceeding
- run: npm install
# A GitHub action for running tests and publishing coverage
- uses: paambaati/[email protected]
env:
# An environment variable, the value is a GitHub repo secret
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATEREPORTERID }}
with:
# Run our `coverage` script in our `package.json`
coverageCommand: npm run coverage
# Great for troubleshooting
debug: true