Skip to content

Commit c3dbd52

Browse files
authored
Add coverage upload to gh actions ci.yml (#1196)
1 parent 5caf4d6 commit c3dbd52

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.buildkite/pipeline.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ steps:
4747
key: qa
4848
agents:
4949
queue: v1
50+
env:
51+
SEGMENT_CODECOV_FLAGS: 'browser'
52+
SEGMENT_CODECOV_ARGS: '--dir=./packages/browser/coverage'
53+
COVERAGE: true
5054
commands:
5155
- npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN}
5256
- echo "--- Install dependencies"
@@ -82,6 +86,10 @@ steps:
8286
paths: ['.yarn/cache/']
8387

8488
- label: '[Core] Lint + Test'
89+
env:
90+
SEGMENT_CODECOV_FLAGS: 'core'
91+
SEGMENT_CODECOV_ARGS: '--dir=./packages/core/coverage'
92+
COVERAGE: true
8593
agents:
8694
queue: v1
8795
commands:

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ jobs:
2626
restore-keys: |
2727
${{ runner.os }}-turbo-
2828
- run: yarn turbo run --filter='./packages/node*' lint
29-
- run: yarn turbo run --filter='./packages/node*' test
29+
- run: COVERAGE=true yarn turbo run --filter='./packages/node*' test
3030
- run: yarn turbo run --filter='./packages/node-integration-tests' test:perf-and-durability
31+
- uses: codecov/codecov-action@v5
32+
with:
33+
fail_ci_if_error: true
34+
flags: node
35+
directory: ./packages/node/coverage
36+
token: ${{ secrets.CODECOV_TOKEN }}
3137
analytics-node-cf-workers:
3238
name: 'analytics-node QA (Cloudflare Workers)'
3339
runs-on: ubuntu-latest

codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ coverage:
55
target: auto
66
threshold: 0%
77
base: auto
8+
comment:
9+
show_carryforward_flags: true

packages/browser/jest.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ module.exports = createJestTSConfig(__dirname, {
66
testEnvironment: 'jsdom',
77
coverageThreshold: {
88
global: {
9-
branches: 74,
10-
functions: 80,
11-
lines: 87,
12-
statements: 82,
9+
branches: 0,
10+
functions: 0,
11+
lines: 0,
12+
statements: 0,
1313
},
1414
},
1515
})

0 commit comments

Comments
 (0)