58 lines (46 loc) · 1.19 KB
/
continuous_integration.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
55
56
57
58
name: Continuous Integration
on:
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Project checkout
uses: actions/checkout@v2
- name: Node.js Setup
uses: actions/setup-node@v2.1.1
- name: Installation of Node.js dependencies
run: npm ci
- name: Lint
run: npm run lint
commit-lint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Project checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v2.0.2
with:
helpURL: https://github.com/PauloGoncalvesBH/ServeRest/blob/trunk/.github/CONTRIBUTING.md
test-api:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14]
steps:
- name: Project checkout
uses: actions/checkout@v2
- name: Node.js v${{ matrix.node }} Setup
uses: actions/setup-node@v2.1.1
with:
node-version: ${{ matrix.node }}
- name: Installation of Node.js dependencies
run: npm ci
- name: API Test
run: npm test
- name: Update Codecov Report
uses: codecov/codecov-action@v1.0.13