Skip to content

Commit

Permalink
Merge pull request #103 from yamadashy/chore/codecov
Browse files Browse the repository at this point in the history
Add Codecov Integration and Configuration
  • Loading branch information
yamadashy authored Oct 6, 2024
2 parents 117447d + 442066a commit 41e4ed1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
patch:
default:
target: 80%
informational: true
project:
default:
target: 75%
threshold: 1%
34 changes: 32 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,42 @@ jobs:
- name: Clean install dependencies
run: npm ci

- run: npm run test --reporter=verbose
env:
CI_OS: ${{ runner.os }}

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
cache: npm

- name: Clean install dependencies
run: npm ci

- run: npm run test-coverage -- --reporter=verbose
env:
CI_OS: ${{ runner.os }}

- uses: actions/upload-artifact@v4
with:
name: test-coverage
path: coverage/

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
directory: ./coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build-and-run:
needs: lint
strategy:
Expand Down Expand Up @@ -76,7 +108,6 @@ jobs:
path: repopack-output.txt

security:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -89,7 +120,6 @@ jobs:
run: npm audit

typos:
needs: lint
name: "Check for typos"
runs-on: "ubuntu-latest"

Expand Down

0 comments on commit 41e4ed1

Please sign in to comment.