This repository has been archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-timer-bug
- Loading branch information
Showing
16 changed files
with
8,898 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
if ! which brew >/dev/null; then | ||
echo "homebrew is not available. Install it from http://brew.sh" | ||
exit 1 | ||
else | ||
echo "homebrew already installed" | ||
fi | ||
|
||
if ! which node >/dev/null; then | ||
echo "installing node..." | ||
brew install node | ||
else | ||
echo "node already installed" | ||
fi | ||
|
||
if ! which yarn >/dev/null; then | ||
echo "installing yarn..." | ||
brew install yarn | ||
else | ||
echo "yarn already installed" | ||
fi | ||
|
||
echo "all dependencies installed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
if ! eMSG=$(circleci config validate -c .circleci/config.yml); then | ||
echo "CircleCI Configuration Failed Validation." | ||
echo $eMSG | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ "$RUN_E2E_TESTS" != "true" ]; then | ||
echo "Skipping end to end tests." | ||
else | ||
echo "Running end to end tests..." | ||
wget https://github.com/segmentio/library-e2e-tester/releases/download/0.3.2/tester_linux_amd64 -O tester | ||
chmod +x tester | ||
./tester -path='./cli.js' -concurrency=3 | ||
echo "End to end tests completed!" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
workflows: | ||
version: 2 | ||
validate-config: | ||
jobs: | ||
- circle-lint | ||
multi-test: | ||
jobs: | ||
- test-node10 | ||
- test-node12 | ||
test_and_publish: | ||
jobs: | ||
- test: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- publish: | ||
context: npm | ||
requires: | ||
- test | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*(-.+)?/ | ||
branches: | ||
ignore: /.*/ | ||
static_analysis: | ||
jobs: | ||
- test | ||
- coverage: | ||
requires: | ||
- test | ||
- snyk: | ||
context: snyk | ||
requires: | ||
- test | ||
scheduled_e2e_test: | ||
triggers: | ||
- schedule: | ||
cron: "15 * * * *" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- scheduled_e2e_testing | ||
jobs: | ||
- test-node10 | ||
- test-node12 | ||
|
||
version: 2 | ||
jobs: | ||
circle-lint: | ||
working_directory: ~/analytics-node | ||
docker: | ||
- image: node | ||
steps: | ||
- checkout | ||
- run: yarn run circle-lint | ||
node-base-test: &node-base-test | ||
working_directory: ~/analytics-node | ||
docker: | ||
- image: node | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: yarn-dependency-cache-{{ checksum "yarn.lock" }} | ||
- run: yarn install --frozen-lockfile | ||
- save_cache: | ||
key: yarn-dependency-cache-{{ checksum "yarn.lock" }} | ||
paths: | ||
- node_modules | ||
- run: yarn test | ||
- persist_to_workspace: | ||
root: . | ||
paths: [.] | ||
|
||
test-node10: | ||
<<: *node-base-test | ||
docker: | ||
- image: circleci/node:10-browsers | ||
test-node12: | ||
<<: *node-base-test | ||
docker: | ||
- image: circleci/node:12-browsers | ||
test: | ||
<<: *node-base-test | ||
docker: | ||
- image: circleci/node:10-browsers | ||
coverage: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
steps: | ||
- checkout | ||
- attach_workspace: { at: . } | ||
- run: yarn run report-coverage | ||
snyk: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
steps: | ||
- checkout | ||
- attach_workspace: { at: . } | ||
- run: yarn run snyk test --severity-threshold=high | ||
- run: yarn run snyk monitor | ||
publish: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
steps: | ||
- checkout | ||
- attach_workspace: { at: . } | ||
- run: npm config set "//registry.npmjs.org/:_authToken" $NPM_AUTH | ||
- run: npm publish . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const tasks = arr => arr.join(' && ') | ||
module.exports = { | ||
'hooks': { | ||
'pre-commit': tasks([ | ||
'exec < /dev/tty', | ||
`if ! [ -x "$(command -v circleci)" ]; then | ||
echo "If you want to verify your circleci config precommit, please install the local circleci tool from https://circleci.com/docs/2.0/local-cli/"; else | ||
yarn run circle-lint | ||
fi` | ||
]) | ||
} | ||
} |
Oops, something went wrong.