Skip to content

Commit

Permalink
Add .drone.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rush committed Feb 8, 2019
1 parent 53b5d73 commit ecddc0c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pipeline:
install:
image: node:8
environment:
- JOBS=8
commands:
- npm install -q
build:
image: node:8
commands:
- npm build
test:
image: node:8
secrets: [ codecov_token ]
commands:
- npm test -- --coverage
upload-coverage:
image: node:8
secrets: [ codecov_token ]
commands:
- "bash -c 'bash <(curl -s https://codecov.io/bash)'"
publish-to-git:
image: node:8
commands:
- git config --global user.email "admin@drone"
- git config --global user.name "Drone CI"
- npx publish-to-git --force
when:
event: tag
13 changes: 12 additions & 1 deletion jestconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@
"^.+\\.(t|j)sx?$": "ts-jest"
},
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
"collectCoverageFrom": [
"src/**/*.js",
"src/**/*.ts"
],
"coverageDirectory": "coverage",
"coveragePathIgnorePatterns": [
"/node_modules"
],
"coverageReporters": [
"lcov"
]
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"test": "jest --config jestconfig.json",
"build": "tsc",
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
"lint": "tslint -p tsconfig.json",
"publish": "publish-to-git"
"lint": "tslint -p tsconfig.json"
},
"author": "",
"license": "UNLICENSED",
Expand Down

0 comments on commit ecddc0c

Please sign in to comment.