-
Notifications
You must be signed in to change notification settings - Fork 17
52 lines (50 loc) · 1.56 KB
/
Copy pathci.yml
File metadata and controls
52 lines (50 loc) · 1.56 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
49
50
51
52
# The name of the workflow
name: build
# What conditions trigger the workflow
# In this case, all pushes and pull requests
on:
pull_request:
push:
branches:
- main
# The jobs that will be run, usually in parallel
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-node@v1
with:
node-version: "12"
- run: cp .env.sample .env
- name: Install dependencies
run: npm install
- run: npm run lint
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: cp .env.sample .env
- run: npm install
# A GitHub action for running tests and publishing coverage
- uses: paambaati/codeclimate-action@v3.0.0
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