Skip to content

Commit

Permalink
build: only pipe to codecov if tests run on Node 10
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and bcoe committed May 6, 2019
1 parent d3d3728 commit b361eb2
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-04-02T18:07:08.916064Z",
"updateTime": "2019-05-04T11:22:40.672305Z",
"sources": [
{
"template": {
"name": "node_library",
"origin": "synthtool.gcp",
"version": "2019.2.26"
"version": "2019.5.2"
}
}
]
Expand Down

0 comments on commit b361eb2

Please sign in to comment.