Skip to content

Commit

Permalink
Merge pull request #11 from rimiti/use-codecov
Browse files Browse the repository at this point in the history
Use codecov
  • Loading branch information
rimiti authored Jan 8, 2018
2 parents 9f10fb4 + c5d7790 commit eff7942
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 60 deletions.
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ before_install:
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- npm install --global npm@^5.3.0
- npm install --global npm@^5.3.0 codecov
- sudo /etc/init.d/mysql stop

script:
- docker-compose up --build --force-recreate --abort-on-container-exit
after_success: codecov
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Dependencies][prod-dependencies-badge]][prod-dependencies]
[![Dependencies][dev-dependencies-badge]][dev-dependencies]
[![Code Climate score][codeclimate-score-badge]][codeclimate-score]
[![Coveralls][coveralls-coverage-badge]][coveralls-coverage]
[![Coveralls][coverage-badge]][coverage]
[![Code Climate coverage][codeclimate-issues-badge]][codeclimate-issues]
[![Node.js version][nodejs-badge]][nodejs]
[![NPM version][npm-badge]][npm]
Expand Down Expand Up @@ -543,20 +543,21 @@ Creates a new Redis store using Redis client `client`.
## Tests
$ docker-compose up - run tests in docker-compose environment
$ npm run docker:run:test
## Scripts
Run using npm run <script> command.
clean - remove coverage data, Jest cache and transpiled files,
lint - lint source files and tests,
typecheck - check type annotations,
test - lint, typecheck and run tests with coverage,
test-only - run tests with coverage,
test:watch - interactive watch mode to automatically re-run tests,
build - compile source files,
clean - remove coverage data, Jest cache and transpiled files.
lint - lint source files and tests.
typecheck - check type annotations.
test - run tests with coverage.
test-only - run tests without coverage.
test:watch - run tests without coverage in watch mode.
build - compile source files.
build:watch - interactive watch mode, compile sources on change.
docker:run:test - run tests into docker-compose.
## License
Expand All @@ -568,8 +569,8 @@ MIT © [Dimitri DO BAIRRO](https://github.com/rimiti/aclify/blob/master/LICENSE)
[dev-dependencies]: https://david-dm.org/rimiti/aclify?type=dev
[codeclimate-score-badge]: https://codeclimate.com/github/rimiti/aclify/badges/gpa.svg
[codeclimate-score]: https://codeclimate.com/github/rimiti/aclify
[coveralls-coverage-badge]: https://coveralls.io/repos/github/rimiti/aclify/badge.svg
[coveralls-coverage]: https://coveralls.io/github/rimiti/aclify
[coverage-badge]: https://codecov.io/gh/rimiti/aclify/branch/master/graph/badge.svg
[coverage]: https://codecov.io/gh/rimiti/aclify
[codeclimate-issues-badge]: https://codeclimate.com/github/rimiti/aclify/badges/issue_count.svg
[codeclimate-issues]: https://codeclimate.com/github/rimiti/aclify
[nodejs-badge]: https://img.shields.io/badge/node->=%206.9.0-blue.svg?style=flat-square
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- mysql
volumes:
- .:/opt/app/:rw
command: sh -c 'cd /opt/app && npm install && npm run test-only-with-coverage'
command: sh -c 'cd /opt/app && npm install && npm run test'

mysql:
image: mysql
Expand Down
41 changes: 4 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "aclify",
"version": "0.1.10",
"version": "0.2.0",
"description": "Node Access Control List (ACL)",
"license": "MIT",
"main": "dist/src/index.js",
"scripts": {
"clean": "rm -rf coverage dist tmp",
"clean": "rm -rf coverage dist tmp jest_0",
"lint": "eslint .",
"typecheck": "flow check",
"pretest": "npm run lint",
"test": "npm run test-only",
"test-only": "jest --coverage",
"test-only-with-coverage": "jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"test": "jest --coverage",
"test-only": "jest",
"test:watch": "jest --watch",
"prepare": "npm run build",
"build": "babel src/**/*.js src/*.js -d dist",
"build:watch": "babel --watch src/**/*.js src/*.js -d dist"
"build:watch": "babel --watch src/**/*.js src/*.js -d dist",
"docker:run:test": "docker-compose up"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -70,7 +70,6 @@
"babel-plugin-transform-flow-strip-types": "~6.22.0",
"babel-plugin-transform-runtime": "~6.23.0",
"babel-preset-stage-3": "~6.24.1",
"coveralls": "^3.0.0",
"eslint": "~4.15.0",
"eslint-config-airbnb-base": "~12.1.0",
"eslint-plugin-flowtype": "^2.39.1",
Expand Down

0 comments on commit eff7942

Please sign in to comment.