-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for Code Climate GitHub Action and React Testing Li…
…brary This commit adds support for the Code Climate GitHub Action and React Testing Library to the project. The `codeclimate.yml` file has been updated to include a `codeclimate` job that runs tests and generates a coverage report using `npm` and `vitest`, and uploads the coverage report to Code Climate using the `paambaati/codeclimate-action` GitHub Action. The `coverage` directory has also been added to the `.gitignore` file to prevent test coverage reports from being committed to the repository. In addition, a test for the `App` component has been added to `src/App.test.tsx` using React Testing Library. This commit also includes the addition of two badges for Code Climate to the `README.md` file.
- Loading branch information
Amaro Mariño
committed
Oct 15, 2023
1 parent
2ac0057
commit b850851
Showing
9 changed files
with
1,663 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Code Climate | ||
|
||
on: push | ||
jobs: | ||
codeclimate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Test & publish code coverage | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: "npm run coverage" | ||
coverageLocations: | | ||
${{github.workspace}}/coverage/clover.xml:clover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# Test coverage reports directory | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.