-
Notifications
You must be signed in to change notification settings - Fork 69
/
test
executable file
·39 lines (30 loc) · 861 Bytes
/
test
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
#!/usr/bin/env bash
# Exit if something fails
set -e
npm run build
npm run lint
npm run typescript
# Unit test React 16 and collect coverage
npm run react:16
npm run unit -- --coverage
mv coverage/coverage-final.json coverage/coverage-react16.json
# Combine unit test coverage
mkdir -p .nyc_output
npx istanbul-merge \
--out .nyc_output/coverage-final.json \
coverage/coverage-react16.json
rm -rf coverage
# Report coverage to coveralls.io
npx nyc report --reporter=text-lcov | npx coveralls
# Report coverage so that danger-plugin-istanbul-coverage can find it
npx nyc report --reporter=json-summary
# PR info bot
npm run danger
# Attempt to run E2E tests
if [ -z "$SAUCE_USERNAME" ] && [ -z "$SAUCE_ACCESS_KEY"]; then
echo
echo "ATTENTION"
echo "Skipping E2E tests because the environment variables are not set!"
else
npm run e2e:full
fi