Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Commit

Permalink
chore(build): move to CircleCI 2.0 (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and jmdobry committed Jul 20, 2018
1 parent 6dbd883 commit 6f025a8
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 47 deletions.
92 changes: 92 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,92 @@
version: 2
workflows:
version: 2
tests:
jobs: &workflow_jobs
- node6:
filters:
tags:
only: /.*/
# - node8:
# filters:
# tags:
# only: /.*/
# - node10:
# filters:
# tags:
# only: /.*/
- lint:
requires:
- node6
# - node8
# - node10
filters:
tags:
only: /.*/
- system_tests:
requires:
- lint
filters:
branches:
only: master
tags:
only: '/^v[\d.]+$/'
- publish_npm:
requires:
- system_tests
filters:
branches:
ignore: /.*/
tags:
only: '/^v[\d.]+$/'
jobs:
node6:
docker:
- image: 'node:6'
steps: &unit_tests_steps
- checkout
- run:
name: Install and configure Cloud SDK
command: |
echo $KEYFILE > key.json
curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-209.0.0-linux-x86_64.tar.gz | tar xz
mv ./google-cloud-sdk /opt
export PATH=$PATH:/opt/google-cloud-sdk/bin
gcloud components install beta -q
gcloud components update -q
gcloud config set project cloud-functions-emulator
gcloud config set compute/region us-central1
gcloud auth activate-service-account --key-file key.json
- run: yarn
- run: yarn test
- run: node_modules/.bin/codecov
# node8:
# docker:
# - image: 'node:8'
# steps: *unit_tests_steps
# node10:
# docker:
# - image: 'node:10'
# steps: *unit_tests_steps
lint:
docker:
- image: 'node:6'
steps:
- checkout
- run: yarn install
- run: npm run lint
system_tests:
docker:
- image: 'node:6'
user: node
steps:
- checkout
- run: yarn
- run: yarn run system-test
publish_npm:
docker:
- image: 'node:10'
steps:
- checkout
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- run: npm publish
47 changes: 0 additions & 47 deletions circle.yml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -93,6 +93,7 @@
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "2.2.0",
"codecov": "^3.0.4",
"intelli-espower-loader": "1.0.1",
"mocha": "5.0.1",
"nock": "9.1.6",
Expand Down

0 comments on commit 6f025a8

Please sign in to comment.