Skip to content

Commit

Permalink
[FEATURE] add ci script
Browse files Browse the repository at this point in the history
  • Loading branch information
depresto committed May 11, 2023
1 parent a395fd5 commit 6eea991
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on: [push, pull_request]

jobs:
test:
name: Test with Codecov
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Run tests and collect coverage
run: npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module.exports = {
collectCoverage: true,
coverageDirectory: "coverage",
preset: "ts-jest",
testEnvironment: "node",
coverageReporters: ["text", "cobertura"],
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"scripts": {
"build": "tsc",
"deploy-npm": "yarn build && yarn publish --access public",
"deploy-npm": "pnpm build && pnpm publish --access public",
"test": "jest"
},
"bugs": {
Expand Down

0 comments on commit 6eea991

Please sign in to comment.