Skip to content

Commit

Permalink
Merge pull request #21 from skrtheboss/develop
Browse files Browse the repository at this point in the history
Merge develop to master
  • Loading branch information
skrtheboss authored Apr 27, 2019
2 parents e809daf + 1309455 commit 65a7919
Show file tree
Hide file tree
Showing 6 changed files with 2,464 additions and 496 deletions.
133 changes: 83 additions & 50 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ aliases:
- &job-defaults
working_directory: ~/semaphore
docker:
# specify the version you desire here
- image: circleci/node:8.16
# specify the version you desire here
- image: circleci/node:8.16

- &yarn-install
run:
Expand All @@ -22,9 +22,9 @@ aliases:
- &restore-cache
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Fallback in case checksum fails
- yarn-packages-{{ .Branch }}-
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Fallback in case checksum fails
- yarn-packages-{{ .Branch }}-

- &save-cache
name: Save Yarn Package Cache
Expand All @@ -33,10 +33,11 @@ aliases:

# Branch filter that can be specified for jobs that should only run on publish branches
# (e.g. master )
- &publish_branches_filter
- &release_branches_filter
branches:
only:
- master
- master
- /rc-.*/

# Workspace initially persisted by the `install` job, and then enhanced by `test_aio` and
# `build-npm-packages`.
Expand All @@ -51,68 +52,100 @@ jobs:
setup:
<<: *job-defaults
steps:
- checkout
- restore_cache: *restore-cache
- *yarn-install
- save_cache: *save-cache
# Persist any changes at this point to be reused by further jobs.
# **NOTE 1 **: Folders persisted here should be kept in sync with `var_13: &attach_workspace`.
# **NOTE 2 **: To add new content to the workspace, always persist on the same root.
- persist_to_workspace:
root: ~/
paths:
- ./semaphore
- checkout
- restore_cache: *restore-cache
- *yarn-install
- save_cache: *save-cache
# Persist any changes at this point to be reused by further jobs.
# **NOTE 1 **: Folders persisted here should be kept in sync with `var_13: &attach_workspace`.
# **NOTE 2 **: To add new content to the workspace, always persist on the same root.
- persist_to_workspace:
root: ~/
paths:
- ./semaphore

lint:
<<: *job-defaults
steps:
- *attach-workspace
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml
- store_test_results:
path: reports/junit
- *attach-workspace
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml
- store_test_results:
path: reports/junit

test:
<<: *job-defaults
steps:
- *attach-workspace
- run:
command: yarn test:ci
- store_test_results:
path: reports/junit
- codecov/upload:
file: coverage/*.json
flags: unittests
- *attach-workspace
- run:
command: yarn test:ci
- store_test_results:
path: reports/junit
- codecov/upload:
file: coverage/*.json
flags: unittests

check-dependencies:
<<: *job-defaults
steps:
- *attach-workspace
- run:
command: ls -la
- run:
command: yarn check-dependencies

doc:
<<: *job-defaults
steps:
- *attach-workspace
- run:
command: yarn doc
- store_artifacts:
path: docs
- *attach-workspace
- run:
command: yarn doc
- store_artifacts:
path: docs

build:
<<: *job-defaults
steps:
- *attach-workspace
- run:
command: yarn build
- *attach-workspace
- run:
command: yarn build
- persist_to_workspace:
root: ~/
paths:
- ./semaphore/dist

release:
<<: *job-defaults
steps:
- *attach-workspace
- run:
command: yarn semantic-release

workflows:
version: 2
default_workflow:
jobs:
- setup
- lint:
requires:
- setup
- test:
requires:
- setup
- doc:
requires:
- setup
- build:
requires:
- setup
- lint:
requires:
- setup
- test:
requires:
- setup
- doc:
requires:
- setup
- build:
requires:
- setup
- check-dependencies:
requires:
- build
- release:
filters:
*release_branches_filter
requires:
- lint
- test
- doc
- build
- check-dependencies
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*
!/dist/**
!package.json
!LICENSE.md
!LICENSE
!README.md
!CHANGELOG.md
13 changes: 13 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"branch": "master",
"verifyConditions": "condition-circle",
"plugins": [
"@semantic-release/commit-analyzer",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github"
]
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[![Build Status][build-status-image]][build-status-url]
[![Coverage Status][coverage-image]][coverage-url]
[![MIT License][license-image]][license-url]
[![semantic-release][semantic-release-image]][semantic-release-url]
[![Renovate enabled][renovate-image]][renovate-url]
[![NPM Package][npm-version-image]][npm-url]
[![NPM Package Downloads][npm-downloads-image]][npm-url]
# Async Semaphore
Expand Down Expand Up @@ -152,6 +154,10 @@ Returns: `Boolean` Promise `true` if success, `false` false if fail
[build-status-url]: https://circleci.com/gh/skrtheboss/ts-async-semaphore/tree/master
[coverage-image]: https://codecov.io/gh/skrtheboss/ts-async-semaphore/branch/master/graph/badge.svg
[coverage-url]: https://codecov.io/gh/skrtheboss/ts-async-semaphore
[renovate-image]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg
[renovate-url]: https://renovatebot.com/
[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release-url]: https://github.com/semantic-release/semantic-release
[npm-url]: https://npmjs.org/package/ts-async-semaphore
[npm-version-image]: http://img.shields.io/npm/v/ts-async-semaphore.svg?style=flat
[npm-downloads-image]: http://img.shields.io/npm/dm/ts-async-semaphore.svg?style=flat
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"name": "ts-async-semaphore",
"version": "0.0.0",
"version": "0.0.0-development",
"description": "A counting semaphore for node based on Java's Sempahore.",
"main": "dist/semaphore.js",
"types": "dist/semaphore.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/skrtheboss/ts-async-semaphore.git"
},
"contributors": [
"Denis Frenademetz (https://github.com/skrtheboss)"
],
"author": "Denis Frenademetz",
"license": "MIT",
"private": false,
Expand Down Expand Up @@ -37,8 +40,7 @@
"test:ci": "jest --ci --runInBand --coverage --config jest.config.ci.js && codecov",
"clean": "shx rm -rf node_modules/ dist/ docs/ coverage/",
"doc": "typedoc --out docs --name ts-async-semaphore --tsconfig tsconfig.json",
"version": "yarn run version:changelog && git add CHANGELOG.md",
"version:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
"semantic-release": "semantic-release"
},
"engines": {
"node": ">=8.0.0"
Expand All @@ -47,14 +49,16 @@
"@types/node": "^8.0.0"
},
"devDependencies": {
"@semantic-release/changelog": "^3.0.2",
"@types/jest": "24.0.11",
"codecov": "3.3.0",
"conventional-changelog-cli": "2.0.17",
"condition-circle": "^2.0.2",
"dependency-check": "3.3.0",
"jest": "24.7.1",
"jest-junit": "6.3.0",
"jest-silent-reporter": "0.1.2",
"rimraf": "2.6.3",
"semantic-release": "15.13.3",
"shx": "0.3.2",
"ts-jest": "24.0.2",
"tslint": "5.16.0",
Expand Down
Loading

0 comments on commit 65a7919

Please sign in to comment.