@@ -6,5 +6,52 @@ name: ci
66jobs :
77 test :
88 runs-on : ubuntu-latest
9+ strategy :
10+ fail-fast : false
11+ matrix :
12+ node : [8, 10, 12, 14, 16]
13+ include :
14+ # use npm 7 by default
15+ - npm-version : ^7
16+ - node : 8
17+ # overrides for node 8
18+ npm-version : ^6
19+ lerna-extra-args : --ignore @opencensus/exporter-stackdriver
20+ env :
21+ OPENCENSUS_MONGODB_TESTS : 1
22+ OPENCENSUS_REDIS_TESTS : 1
23+ services :
24+ mongo_service :
25+ image : mongo
26+ ports : ["27017:27017"]
27+ redis_service :
28+ image : redis
29+ ports : ["6379:6379"]
30+
931 steps :
10- - run : echo "hello world"
32+ - uses : actions/checkout@v2
33+ - uses : actions/setup-node@v2
34+ with :
35+ node-version : ${{ matrix.node }}
36+ - uses : actions/cache@v2
37+ with :
38+ path : ~/.npm
39+ key : v1-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
40+ restore-keys : |
41+ v1-node-${{ matrix.node }}-
42+ v1-node-
43+ - name : Upgrade to latest npm
44+ run : npm install -g npm@${{ matrix.npm-version }}
45+ - name : Print node/npm version
46+ run : node --version && npm --version
47+
48+ # compile runs in prepare
49+ - name : Install modules and dependencies, compile
50+ run : npm install
51+
52+ # lint runs in posttest
53+ - name : Run unit tests and lint
54+ run : npm run test -- ${{ matrix.lerna-extra-args }}
55+ - name : Submit coverage data to codecov.
56+ run : npm run codecov -- ${{ matrix.lerna-extra-args }}
57+ if : ${{ success() && matrix.node == '12' }}
0 commit comments