ci(codecov): Add codecov and upload test coverage (#34)

This commit is contained in:
Jonghyeon Ko 2024-06-13 13:56:41 +09:00 committed by GitHub
parent a7db6d88da
commit ced287ff88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 39 additions and 0 deletions

26
.github/workflows/codecov.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: CI
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'yarn'
- run: yarn install
- run: yarn test
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

13
codecov.yml Normal file
View File

@ -0,0 +1,13 @@
coverage:
status:
patch: off
project:
default:
target: 100%
threshold: 10%
comment:
layout: 'header, reach, diff, flags, components'
ignore:
- '**/*.test-d.*'