Skip to content

Commit

Permalink
Use GitHub Action to send code coverage to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
paazmaya committed Dec 21, 2024
1 parent ff3dc26 commit 9dfe7b3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 438 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/linting-and-unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@v4

- name: Use Node.js v22
uses: actions/setup-node@v4
with:
node-version: '22.x'
- run: npm ci
- run: npm run lint
- run: npm test

#- name: Frogbot by JFrog
# uses: jfrog/[email protected]
# env:
# JF_URL: ${{ secrets.JF_URL }}
# JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
# JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# JF_FAIL: "FALSE" # Do not fail the build

- name: Install Node.js dependencies
run: npm ci

- name: Lint and test
run: |
npm run lint
npm test
npm run coverage
- name: Upload code coverage to codecov
# https://github.com/marketplace/actions/codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.lcov
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[![DeepSource](https://deepsource.io/gh/paazmaya/tozan.svg/?label=active+issues&show_trend=true&token=5S_Ijf0eG_jzMUpAb3Dwn7CU)](https://deepsource.io/gh/paazmaya/tozan/?ref=repository-badge)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=paazmaya_tozan&metric=code_smells)](https://sonarcloud.io/dashboard?id=paazmaya_tozan)
[![OpenSSF Scorecard](htt‌ps://api.securityscorecards.dev/projects/github.com/paazmaya/tozan/badge)](htt‌ps://securityscorecards.dev/viewer/?uri=github.com/paazmaya/tozan)

Go trough the files under a given directory, generate a hash of each of the files (which by default is SHA1), and store the hashes to a SQLite database (which by default is in memory).
In case the given file was already listed in the database, its entry will be updated.

Expand Down
Loading

0 comments on commit 9dfe7b3

Please sign in to comment.