Skip to content

Commit

Permalink
Add coverage upload to gh actions ci.yml (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGHSeg authored Dec 17, 2024
1 parent 5caf4d6 commit c3dbd52
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ steps:
key: qa
agents:
queue: v1
env:
SEGMENT_CODECOV_FLAGS: 'browser'
SEGMENT_CODECOV_ARGS: '--dir=./packages/browser/coverage'
COVERAGE: true
commands:
- npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN}
- echo "--- Install dependencies"
Expand Down Expand Up @@ -82,6 +86,10 @@ steps:
paths: ['.yarn/cache/']

- label: '[Core] Lint + Test'
env:
SEGMENT_CODECOV_FLAGS: 'core'
SEGMENT_CODECOV_ARGS: '--dir=./packages/core/coverage'
COVERAGE: true
agents:
queue: v1
commands:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ jobs:
restore-keys: |
${{ runner.os }}-turbo-
- run: yarn turbo run --filter='./packages/node*' lint
- run: yarn turbo run --filter='./packages/node*' test
- run: COVERAGE=true yarn turbo run --filter='./packages/node*' test
- run: yarn turbo run --filter='./packages/node-integration-tests' test:perf-and-durability
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
flags: node
directory: ./packages/node/coverage
token: ${{ secrets.CODECOV_TOKEN }}
analytics-node-cf-workers:
name: 'analytics-node QA (Cloudflare Workers)'
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ coverage:
target: auto
threshold: 0%
base: auto
comment:
show_carryforward_flags: true
8 changes: 4 additions & 4 deletions packages/browser/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module.exports = createJestTSConfig(__dirname, {
testEnvironment: 'jsdom',
coverageThreshold: {
global: {
branches: 74,
functions: 80,
lines: 87,
statements: 82,
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
})

0 comments on commit c3dbd52

Please sign in to comment.