This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
62 lines (59 loc) · 1.75 KB
/
ci.yaml
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
59
60
61
62
on:
push:
branches: [master]
pull_request:
name: ci
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [8, 10, 12, 14, 16]
include:
# use npm 7 by default
- npm-version: ^7
- node: 8
# overrides for node 8
npm-version: ^6
lerna-extra-args: >-
--ignore @opencensus/exporter-stackdriver
--ignore @opencensus/resource-util
--no-private
env:
OPENCENSUS_MONGODB_TESTS: 1
OPENCENSUS_REDIS_TESTS: 1
services:
mongo_service:
image: mongo:5
ports: ["27017:27017"]
redis_service:
image: redis
ports: ["6379:6379"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: v1-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
v1-node-${{ matrix.node }}-
v1-node-
- name: Upgrade to latest npm
run: npm install -g npm@${{ matrix.npm-version }}
- name: Print node/npm version
run: node --version && npm --version
# compile runs in prepare
- name: Install modules and dependencies, compile
run: |
npm install --ignore-scripts
npm run bootstrap -- ${{ matrix.lerna-extra-args }}
# lint runs in posttest
- name: Run unit tests and lint
run: npm run test -- ${{ matrix.lerna-extra-args }}
- name: Submit coverage data to codecov.
run: npm run codecov -- ${{ matrix.lerna-extra-args }}
if: ${{ success() && matrix.node == '12' }}