From 7abdf7022558a7c575272945a161ad1995ae7ed3 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Fri, 22 Nov 2024 16:03:35 -0500 Subject: [PATCH 1/5] Add coverage upload to gh actions ci.yml --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7db4a5a2..248ddcffc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,11 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'yarn' + - uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + flags: node + token: ${{ secrets.CODECOV_TOKEN }} - run: yarn install --immutable - name: Turbo cache uses: actions/cache@v3 From 3b2f81e63bf8de7783e215d09274122db13193af Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Fri, 22 Nov 2024 16:07:48 -0500 Subject: [PATCH 2/5] Update order and coverage directory --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 248ddcffc..c48409ea0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,6 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'yarn' - - uses: codecov/codecov-action@v5 - with: - fail_ci_if_error: true - flags: node - token: ${{ secrets.CODECOV_TOKEN }} - run: yarn install --immutable - name: Turbo cache uses: actions/cache@v3 @@ -33,6 +28,12 @@ jobs: - run: yarn turbo run --filter='./packages/node*' lint - run: 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 From b78b33eaacecad33a50771ead63e55b74dce9840 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Fri, 22 Nov 2024 16:20:16 -0500 Subject: [PATCH 3/5] Enable coverage on test run --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c48409ea0..2f6617cdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ 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: From 151b2402856a03b578ed4b3f7d07ba4b43e6a253 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Fri, 22 Nov 2024 16:51:49 -0500 Subject: [PATCH 4/5] Testing flags and directory for buildkite pipeline --- .buildkite/pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 993722c91..426af9697 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -30,6 +30,9 @@ steps: - label: '[Browser] Lint + Test' key: browser-lint-test + env: + SEGMENT_CODECOV_FLAGS: 'browser' + SEGMENT_CODECOV_ARGS: '--dir=packages/browser/coverage' agents: queue: v1 commands: @@ -82,6 +85,9 @@ steps: paths: ['.yarn/cache/'] - label: '[Core] Lint + Test' + env: + SEGMENT_CODECOV_FLAGS: 'core' + SEGMENT_CODECOV_ARGS: '--dir=packages/core/coverage' agents: queue: v1 commands: From 726b7b0b847d607f84b02818adec7415ea528fb6 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Fri, 22 Nov 2024 17:06:39 -0500 Subject: [PATCH 5/5] Fixing path for coverage --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 426af9697..f17b524c8 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -32,7 +32,7 @@ steps: key: browser-lint-test env: SEGMENT_CODECOV_FLAGS: 'browser' - SEGMENT_CODECOV_ARGS: '--dir=packages/browser/coverage' + SEGMENT_CODECOV_ARGS: '--dir=./packages/browser/coverage' agents: queue: v1 commands: @@ -87,7 +87,7 @@ steps: - label: '[Core] Lint + Test' env: SEGMENT_CODECOV_FLAGS: 'core' - SEGMENT_CODECOV_ARGS: '--dir=packages/core/coverage' + SEGMENT_CODECOV_ARGS: '--dir=./packages/core/coverage' agents: queue: v1 commands: