Created
July 22, 2018 11:09
-
-
Save Bajena/36437b255e148cb432e9f34789429fa8 to your computer and use it in GitHub Desktop.
Build + deploy Google Data Studio connector in CircleCI
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
# Javascript Node CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | |
# | |
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/node:7.10 | |
working_directory: ~/repo | |
steps: | |
- checkout | |
# Download and cache dependencies | |
- restore_cache: | |
keys: | |
- v1-dependencies-{{ checksum "package.json" }} | |
# fallback to using the latest cache if no exact match is found | |
- v1-dependencies- | |
- run: | |
name: "Install dependencies" | |
command: yarn install | |
- save_cache: | |
paths: | |
- node_modules | |
key: v1-dependencies-{{ checksum "package.json" }} | |
- run: | |
name: "Lint the code" | |
command: yarn lint | |
- run: | |
name: "Run tests (with coverage)" | |
command: yarn coverage | |
- run: | |
name: "Send coverage to CodeCov" | |
command: yarn add --dev codecov && ./node_modules/.bin/codecov | |
deploy: | |
docker: | |
- image: circleci/node:7.10 | |
working_directory: ~/repo | |
steps: | |
- checkout | |
# Download and cache dependencies | |
- restore_cache: | |
keys: | |
- v1-dependencies-{{ checksum "package.json" }} | |
# fallback to using the latest cache if no exact match is found | |
- v1-dependencies- | |
- run: | |
name: "Install dependencies" | |
command: yarn install | |
- save_cache: | |
paths: | |
- node_modules | |
key: v1-dependencies-{{ checksum "package.json" }} | |
- run: | |
name: "Write .clasprc.json file" | |
command: echo $CLASPRC > ~/.clasprc.json | |
- run: | |
name: "Release Google Script version" | |
command: yarn deploy-production | |
workflows: | |
version: 2 | |
build-deploy: | |
jobs: | |
- build | |
- deploy: | |
requires: | |
- build | |
filters: | |
branches: | |
only: master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment