@@ -49,16 +49,19 @@ jobs:
4949 - os : ubuntu-latest
5050 name : ubuntu-latest
5151 codecov-flag : ubuntu
52+ upload-coverage : true
5253 - os : windows-latest
5354 name : windows-latest
5455 codecov-flag : windows
56+ upload-coverage : false
5557 steps :
5658 - name : Checkout code
5759 uses : actions/checkout@v4
5860 - name : Setup Node.js and pnpm
5961 uses : ./.github/actions/setup-node-pnpm
60- - name : Cache Turbo
61- uses : actions/cache@v4
62+ - name : Restore Turbo cache
63+ id : turbo-cache
64+ uses : actions/cache/restore@v4
6265 with :
6366 path : .turbo/cache
6467 key : ${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
@@ -71,13 +74,24 @@ jobs:
7174 run : pnpm turbo run test:coverage:unit --filter="@roo-code/core" --log-order grouped --output-logs new-only
7275 - name : Run core integration coverage
7376 run : pnpm turbo run test:coverage:integration --filter="@roo-code/core" --log-order grouped --output-logs new-only
77+ - name : Save Turbo cache
78+ if : steps.turbo-cache.outputs.cache-hit != 'true'
79+ uses : actions/cache/save@v4
80+ with :
81+ path : .turbo/cache
82+ key : ${{ steps.turbo-cache.outputs.cache-primary-key }}
83+ # Only ubuntu uploads coverage. Windows still runs the same test
84+ # lanes for behavioral confidence, but duplicating coverage uploads
85+ # there mostly adds Codecov overhead without changing pass/fail
86+ # behavior.
7487 # Coverage is uploaded in three separate steps so each LCOV gets the
7588 # correct flag set. Codecov double-counts overlapping lines when a
7689 # single upload carries multiple flags whose paths overlap, so the
7790 # two core lanes (which both cover packages/core/src/**) must be
7891 # uploaded individually with their own lane flag.
7992 # See https://docs.codecov.com/docs/flags
8093 - name : Upload non-core coverage to Codecov
94+ if : matrix.upload-coverage
8195 uses : codecov/codecov-action@v4
8296 with :
8397 files : >-
@@ -86,17 +100,22 @@ jobs:
86100 packages/cloud/coverage/lcov.info,
87101 packages/telemetry/coverage/lcov.info,
88102 apps/cli/coverage/lcov.info
103+ disable_search : true
89104 flags : ${{ matrix.codecov-flag }}
90105 token : ${{ secrets.CODECOV_TOKEN }}
91106 - name : Upload core unit coverage to Codecov
107+ if : matrix.upload-coverage
92108 uses : codecov/codecov-action@v4
93109 with :
94110 files : packages/core/coverage/unit/lcov.info
111+ disable_search : true
95112 flags : ${{ matrix.codecov-flag }},core-unit
96113 token : ${{ secrets.CODECOV_TOKEN }}
97114 - name : Upload core integration coverage to Codecov
115+ if : matrix.upload-coverage
98116 uses : codecov/codecov-action@v4
99117 with :
100118 files : packages/core/coverage/integration/lcov.info
119+ disable_search : true
101120 flags : ${{ matrix.codecov-flag }},core-integration
102121 token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments