-
Notifications
You must be signed in to change notification settings - Fork 190
36 lines (34 loc) · 1.03 KB
/
ci-test.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
name: NodeJS CI with NPM
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
node_version: ['6', '8', '10', '12', '14', '16', '18', '20']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- name: Setup dependencies
run: |
npm install
# nyc@14 support nodejs >= 6
npm install -g nyc@14
- name: Run cases
run: |
npm run check-type
nyc --reporter=lcov npm test
env:
QINIU_ACCESS_KEY: ${{ secrets.QINIU_ACCESS_KEY }}
QINIU_SECRET_KEY: ${{ secrets.QINIU_SECRET_KEY }}
QINIU_TEST_BUCKET: ${{ secrets.QINIU_TEST_BUCKET }}
QINIU_TEST_DOMAIN: ${{ secrets.QINIU_TEST_DOMAIN }}
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}