1 | #!/bin/bash
|
2 |
|
3 | set -eo pipefail
|
4 |
|
5 | if [ $LINT ]; then
|
6 | npm run lint
|
7 | fi
|
8 |
|
9 | # Disabled for PRs as encrypted variables (which are required for snyk to run) are not propagated to forks
|
10 | if [ $SNYK ]; then
|
11 | if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
12 | npm run snyk
|
13 | else
|
14 | echo "snyk test is disabled on pull requests"
|
15 | fi
|
16 | fi
|
17 |
|
18 | if [ ! $LINT ] && [ ! $SNYK ]; then
|
19 | npm run test
|
20 | fi
|
21 |
|
22 | exit 0;
|