forked from VoxaAI/voxa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-ci.sh
executable file
·41 lines (32 loc) · 873 Bytes
/
run-ci.sh
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
#!/bin/bash
set -euo pipefail
set -o xtrace
yarn run test-ci
yarn run report
yarn run lint
npx nyc check-coverage
npx typedoc --out typedoc --name Voxa --readme ./README.md --target ES2017 --ignoreCompilerErrors ./src
NODE_VERSION=${TRAVIS_NODE_VERSION:-}
if [ -z "${NODE_VERSION}" ]; then
NODE_VERSION=$(node --version | cut -d 'v' -f2 | cut -d'.' -f1)
fi
LAMBDA_VERSION="$NODE_VERSION"
if [[ $NODE_VERSION == '10' ]]; then
LAMBDA_VERSION='10.x'
elif [[ $NODE_VERSION == '12' ]]; then
LAMBDA_VERSION='12.x'
fi
export NODE_VERSION
export LAMBDA_VERSION
echo "NODE_VERSION: $NODE_VERSION"
echo "LAMBDA_VERSION: $LAMBDA_VERSION"
docker pull "lambci/lambda:nodejs$LAMBDA_VERSION"
(
cd hello-world
rm -rf node_modules
yarn
yarn mocha hello-world.spec.js
)
if [ "${CI:-}" = "true" ]; then
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
fi