Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding test coverage tracker #71

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"all": true,
"cache": false,
"extension": [".js"],
"include": ["dist/esm/src/**"],
"exclude": ["dist/esm/src/types/**"],
"reporter": ["text", "cobertura"]
}
5 changes: 5 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ jobs:

- name: Run linter
run: npm run lint

- name: Upload test coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ etc
node_modules
tmp
dwn.db
coverage
4 changes: 3 additions & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"enable-source-maps": true
"enable-source-maps": true,
"exit": true,
"spec": ["dist/esm/tests/**/*.spec.js"]
}
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ We take our open-source community seriously. Please adhere to our [Code of Condu
- This is run via CI whenever a pull request is opened, or a commit is pushed to a branch that has an open PR.
- Make sure to cover added code with tests, if it should be tested

### Test Coverage

- [Codecov](https://app.codecov.io/github/TBD54566975/dwn-server) is used to track
the coverage of our tests and will automatically comment on every pull request
showing the impact to overall coverage.
- If your pull request introduces new features or changes existing logic, please
ensure you include comprehensive tests that cover edge-cases and failure
scenarios. This ensures that your contributions are of the highest quality and
safeguards our codebase against potential bugs or breaking changes.
- Thorough tests are also a great way to better understand your proposed changes.
- If you encounter any difficulties while writing tests, don't hesitate to reach
out for help or guidance in our Web5
[Discord](https://discord.com/channels/937858703112155166/1068273971432280196)
channel.

### Code Style

- Our preferred code style has been codified into `eslint` and `prettier`.
Expand Down
Loading
Loading