Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
build: only pipe to codecov if tests run in Node 10 (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and callmehiphop committed May 7, 2019
1 parent d863746 commit c5a299d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
10 changes: 6 additions & 4 deletions .kokoro/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ cd $(dirname $0)/..
npm install

# Install and link samples
cd samples/
npm link ../
npm install
cd ..
if [ -f samples/package.json ]; then
cd samples/
npm link ../
npm install
cd ..
fi

npm run lint
16 changes: 9 additions & 7 deletions .kokoro/samples-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ if [ -f .kokoro/pre-samples-test.sh ]; then
set -x
fi

npm install
if [ -f samples/package.json ]; then
npm install

# Install and link samples
cd samples/
npm link ../
npm install
cd ..
# Install and link samples
cd samples/
npm link ../
npm install
cd ..

npm run samples-test
npm run samples-test
fi
12 changes: 10 additions & 2 deletions .kokoro/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ cd $(dirname $0)/..

npm install
npm test
./node_modules/nyc/bin/nyc.js report

bash $KOKORO_GFILE_DIR/codecov.sh
COVERAGE_NODE=10
if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then
NYC_BIN=./node_modules/nyc/bin/nyc.js
if [ -f "$NYC_BIN" ]; then
$NYC_BIN report
fi
bash $KOKORO_GFILE_DIR/codecov.sh
else
echo "coverage is only reported for Node $COVERAGE_NODE"
fi
4 changes: 2 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"updateTime": "2019-03-08T00:45:34.510120Z",
"updateTime": "2019-05-04T11:06:20.683603Z",
"sources": [
{
"template": {
"name": "node_library",
"origin": "synthtool.gcp",
"version": "2019.1.16"
"version": "2019.5.2"
}
}
]
Expand Down

0 comments on commit c5a299d

Please sign in to comment.