Skip to content
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
41 changes: 41 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "50...100"

status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%

# Ignore files/directories that tests won't cover
ignore:
- "tests/**" # Test files
- "**/*.test.ts" # Test files
- "**/*.spec.ts" # Test files
- "lib/**" # Compiled output
- "coverage/**" # Coverage reports
- "node_modules/**" # Dependencies

# Carry forward coverage from previous successful uploads when a flag's
# report is missing (e.g. a CI test suite failed and skipped uploading).
# This prevents patch coverage from dropping drastically due to incomplete data.
flag_management:
default_rules:
carryforward: true

flags:
unit-tests:
carryforward: true

comment:
layout: "reach,diff,flags,files"
behavior: default
13 changes: 13 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
name: PR Checks

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -32,6 +35,9 @@ jobs:

unit-tests:
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -50,3 +56,10 @@ jobs:
run: yarn lint
- name: Run unit tests
run: yarn test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
use_oidc: true
flags: unit-tests
files: coverage/lcov.info
fail_ci_if_error: false
Loading