Skip to content

Commit

Permalink
Merge pull request #56 from uport-project/develop
Browse files Browse the repository at this point in the history
chore: new release
  • Loading branch information
mirceanis authored Dec 17, 2020
2 parents d65933c + bcdab7e commit 297c1c2
Show file tree
Hide file tree
Showing 13 changed files with 14,815 additions and 11,039 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

151 changes: 121 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,129 @@
version: 2
###############################################################
# References
###############################################################
version: 2.1
references:
restore-npm-cache: &restore-npm-cache
restore_cache:
keys:
# when lock file changes, use increasingly general patterns to restore cache
- npm-packages-v1-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}
- npm-packages-v1-{{ checksum "package.json" }}
- npm-packages-v1-

save-npm-cache: &save-npm-cache
save_cache:
paths:
- node_modules/
key: npm-packages-v1-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}

###############################################################
# Workflows
###############################################################
workflows:
# Trigger workflow for last commit (merge commits) to master
# Run unit tests for sanity and if all looks good run semantic release
# Semantic release will decide based on commit messages if another release is needed
# Always run unit tests on master
automatic-semantic-release:
jobs:
- verify-unit-tests:
filters:
branches:
only:
- master
- run-semantic-release:
context: uport-open-automation
requires:
- verify-unit-tests
filters:
branches:
only:
- master
tags:
# Would be good if we can ignore tagged commits but it won't trigger another build so it's fine
ignore: /.*/

# This gets triggers on every push to all branches except master
# It verifies the branch, runs unit tests and coverage
verify-test-build:
jobs:
- verify-unit-tests:
filters:
branches:
ignore:
- master

# deploy-release-tag:
# jobs:
# - verify-unit-tests:
# filters:
# tags:
# only: /^v?((\d+\.))?(\d+\.)(\d+)-(dev|alpha|beta).*/
# branches:
# ignore: /.*/
# - deploy-to-npm:
# context: uport-open-automation
# requires:
# - verify-unit-tests
# filters:
# tags:
# only: /^v?((\d+\.))?(\d+\.)(\d+)-(dev|alpha|beta).*/
# branches:
# ignore: /.*/

###############################################################
# Jobs
###############################################################

jobs:
build:
working_directory: ~/did-jwt
verify-unit-tests:
working_directory: ~/project
docker:
- image: circleci/node:8
- image: circleci/node:12
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- dependencies-cache-{{ checksum "package.json" }}

- *restore-npm-cache
- run:
name: install-dependencies
command: |
sudo npm i -g codecov node-gyp
npm install
- run:
name: test
command: npm run test:ci && codecov

name: Install node modules
command: npm install
- *save-npm-cache
- run:
name: code-coverage
command: bash <(curl -s https://codecov.io/bash)

- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
name: Run unit tests
command: npm run test:ci
# - run:
# name: Run lint
# command: npm run lint
- persist_to_workspace:
root: ~/project
paths:
- ./node_modules
- node_modules

workflows:
version: 2
build-and-deploy:
jobs:
- build
run-semantic-release:
working_directory: ~/project
docker:
- image: circleci/node:12
steps:
- checkout:
path: ~/project
- attach_workspace:
at: ~/project
- run:
name: Semantic release
command: |
git config user.email $GH_EMAIL
git config user.name $GH_USER
npm run release
#
# deploy-to-npm:
# working_directory: ~/project
# docker:
# - image: circleci/node:12
# steps:
# - checkout:
# path: ~/project
# - attach_workspace:
# at: ~/project
# - run:
# name: publish to npm
# command: npm publish
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ coverage

.DS_Store
/.idea/

.rts2_cache_cjs
.rts2_cache_es
.rts2_cache_umd
/.idea/
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"jsxBracketSameLine": false,
"trailingComma": "none",
"tabWidth": 2,
"printWidth": 80,
"singleQuote": true,
"semi": false
}
14 changes: 14 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github"
],
"branch": "master"
}
13 changes: 0 additions & 13 deletions babel-preset.js

This file was deleted.

Loading

0 comments on commit 297c1c2

Please sign in to comment.