Skip to content

Commit

Permalink
build: only pipe to codecov if tests run in Node 10 (googleapis#469)
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 ae06ec2 commit ec827f8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 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 [email protected] --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
12 changes: 6 additions & 6 deletions synth.metadata
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"updateTime": "2019-04-21T11:40:51.528722Z",
"updateTime": "2019-05-04T11:10:42.529157Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.26",
"dockerImage": "googleapis/artman@sha256:314eae2a40f6f7822db77365cf5f45bd513d628ae17773fd0473f460e7c2a665"
"version": "0.18.0",
"dockerImage": "googleapis/artman@sha256:29bd82cc42c43825fde408e63fc955f3f9d07ff9989243d7aa0f91a35c7884dc"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "3369c803f56d52662ea3792076deb8545183bdb0",
"internalRef": "244282812"
"sha": "39c876cca5403e7e8282ce2229033cc3cc02962c",
"internalRef": "246561601"
}
},
{
"template": {
"name": "node_library",
"origin": "synthtool.gcp",
"version": "2019.4.10"
"version": "2019.5.2"
}
}
],
Expand Down

0 comments on commit ec827f8

Please sign in to comment.