-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (42 loc) · 1.23 KB
/
tests.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
name: Tests
on:
push:
paths-ignore:
- "**.md"
- ".dependabot/**"
- ".vscode/**"
branches-ignore:
- "dependabot/**"
pull_request:
paths-ignore:
- "**.md"
- ".dependabot/**"
- ".vscode/**"
jobs:
Test:
name: Test with Node ${{ matrix.node-version }}
runs-on: windows-latest
env:
node-version: 12.x
strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Prepare .env file
run: powershell -Command "(gc .sample-env) -replace 'BP_API_AUTH_USERNAME=', 'BP_API_AUTH_USERNAME=user' -replace 'BP_API_AUTH_PASSWORD=', 'BP_API_AUTH_PASSWORD=pw' -replace 'BP_API_DBCONNAME=', 'BP_API_DBCONNAME=test' | Out-File -encoding ASCII .env"
- name: Lint
run: npm run lint
- name: Test and generate code coverage
run: npm run test-cover
- name: Upload code coverage
run: npx codecov --disable=gcov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}