-
Notifications
You must be signed in to change notification settings - Fork 22
50 lines (42 loc) · 1.2 KB
/
nodejs.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
name: Node.js CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18, 20]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js 20 for Mockoon CLI
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Run Mockoon CLI
uses: mockoon/cli-action@v1
with:
version: '6.0.1'
data-file: 'https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json'
port: 3000
- name: Setup Node.js for test
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Execute test
run: make test
env:
BASE_PATH: http://localhost:3000
- name: Publish code coverage
if: matrix.node-version == 14
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/coverage*.lcov:lcov