forked from openscope/openscope
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.36 KB
/
Copy pathpull-request.yml
File metadata and controls
51 lines (49 loc) · 1.36 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
name: checks
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2 # makes available shas HEAD (head of feature branch) and HEAD~1 (head of target branch) - Note: this is different in a push action!
- name: Use Node.JS v11.3
uses: actions/setup-node@v1
with:
node-version: 11.3
- name: Install dependencies
run: npm install
- name: Find lint errors on changed lines
run: npm run lint-diff HEAD~1..HEAD
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.JS v11.3
uses: actions/setup-node@v1
with:
node-version: 11.3
- name: Install dependencies
run: npm install
- name: Build application
run: npm run build
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.JS v11.3
uses: actions/setup-node@v1
with:
node-version: 11.3
- name: Install dependencies
run: npm install
- name: Run test suite
run: npm run test
- name: Check test coverage versus target branch (via coveralls.io)
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ always() }}