Skip to content

Commit

Permalink
feat(ci): add semantic-release in dryrun mode
Browse files Browse the repository at this point in the history
  • Loading branch information
acchou committed Apr 26, 2019
1 parent ce82385 commit d584720
Show file tree
Hide file tree
Showing 5 changed files with 4,347 additions and 18 deletions.
28 changes: 25 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,44 @@ jobs:
- run:
command: npm run codecov
when: always
release:
description: "semantic release"
executor: node10
steps:
- checkout
- restore_cache:
keys:
- node10-{{ checksum "package.json" }}
- node10
- run: npm install
- run: npm run build
- run: npm run test-release
- run: npm run semantic-release

workflows:
version: 2
aws:
faastjs:
jobs:
- build_and_test:
name: "aws-node10"
nodeVersion: "node10"
executor: node10
target: "test-aws-release"
- build_and_test:
name: "aws-node8"
nodeVersion: "node8"
executor: node8
target: "test-aws-release"
google:
jobs:
- build_and_test:
name: "google-node10"
nodeVersion: "node10"
executor: node10
target: "test-google-remote"
- release:
requires:
- aws-node10
- aws-node8
- google-node10
filters:
branches:
only: master
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# <a href="https://faastjs.org"><img alt="faast.js" src="./website/static/img/faastjs.png" height="50"></a>

[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0) [![CircleCI](https://circleci.com/gh/faastjs/faast.js.svg?style=shield&circle-token=c97f196a78c7173d6ca4e5fc9f09c2cba4ab0647)](https://circleci.com/gh/faastjs/faast.js) [![codecov](https://codecov.io/gh/faastjs/faast.js/branch/master/graph/badge.svg?token=Ml90RLLbEh)](https://codecov.io/gh/faastjs/faast.js) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/1132c1cda6a24a5d85d7c7c61c849ef6)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=faastjs/faast.js&utm_campaign=Badge_Grade)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0) [![CircleCI](https://circleci.com/gh/faastjs/faast.js.svg?style=shield&circle-token=c97f196a78c7173d6ca4e5fc9f09c2cba4ab0647)](https://circleci.com/gh/faastjs/faast.js) [![codecov](https://codecov.io/gh/faastjs/faast.js/branch/master/graph/badge.svg?token=Ml90RLLbEh)](https://codecov.io/gh/faastjs/faast.js) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/1132c1cda6a24a5d85d7c7c61c849ef6)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=faastjs/faast.js&utm_campaign=Badge_Grade)[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

Faast.js dynamically transforms JavaScript modules into scalable serverless functions.

Expand Down
3 changes: 3 additions & 0 deletions docs/12-contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,12 @@ See `.circleci/config.yml`. On CircleCI's project settings page, you need to set
| `GOOGLE_APPLICATION_CREDENTIALS` | gcp-key.json |
| `GOOGLE_KEY_VALUE` | The contents of a Google service account key (a JSON file) |
| `CODECOV_TOKEN` | The project token for [codecov][], available in web console. |
| `GH_TOKEN` | Github token (for [semantic-release][]) |
| `NPM_TOKEN` | NPM publish token (for [semantic-release][]) |

[aws cli]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
[codecov]: https://codecov.io/
[semantic-release]: https://github.com/semantic-release/semantic-release

Google requires pointing to a file on disk for credentials. To get around this, the run script `npm run set-gcp-key` copies the contents of the `GOOGLE_KEY_VALUE` environment variable into the file `gcp-key.json` in the current working directory. Therefore setting `GOOGLE_APPLICATION_CREDENTIALS` to `gcp-key.json` allows Google authentication to work. The circleci yaml configuration already performs these steps so only the environment variables need to be set.

Expand Down

0 comments on commit d584720

Please sign in to comment.