@@ -143,39 +143,10 @@ jobs:
143143 - name : Run TSC
144144 run : pnpm run type-check
145145
146- codecov-startup :
147- name : Codecov Startup
148- runs-on : ubuntu-latest
149- needs : install
150- steps :
151- - name : Checkout
152- uses : actions/checkout@v4
153- with :
154- fetch-depth : 2
155-
156- - name : Install CLI
157- if : ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
158- run : |
159- pip install --no-cache-dir codecov-cli
160-
161- - name : Run Startup
162- if : ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
163- env :
164- CODECOV_TOKEN : ${{ secrets.CODECOV_ORG_TOKEN }}
165- run : |
166- codecovcli -u ${{ secrets.CODECOV_URL }} create-commit --fail-on-error
167- codecovcli -u ${{ secrets.CODECOV_URL }} create-report --fail-on-error
168-
169- - name : Run Startup Staging
170- if : ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
171- run : |
172- codecovcli -u ${{ secrets.CODECOV_STAGING_URL }} create-commit -t ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} --fail-on-error
173- codecovcli -u ${{ secrets.CODECOV_STAGING_URL }} create-report -t ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} --fail-on-error
174-
175146 unit-test :
176147 name : Run Unit Tests
177148 runs-on : ubuntu-latest
178- needs : [install, codecov-startup ]
149+ needs : [install]
179150 steps :
180151 - name : Checkout
181152 uses : actions/checkout@v4
@@ -218,22 +189,33 @@ jobs:
218189 - name : Run unit tests
219190 run : pnpm run test:unit:ci --maxWorkers=2
220191
221- - name : Install CLI
222- if : ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
223- run : |
224- pip install --no-cache-dir codecov-cli
225-
226- - name : Upload coverage reports to Codecov
227- # # Don't upload on forks for now.
192+ - name : Upload coverage reports to codecov
228193 if : ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
229- run : |
230- codecovcli -u ${{ secrets.CODECOV_URL }} do-upload -t ${{ secrets.CODECOV_ORG_TOKEN }} --fail-on-error
231-
232- - name : Upload coverage reports to Codecov staging
233- # # Don't upload on forks for now.
194+ uses : codecov/codecov-action@v4
195+ with :
196+ token : ${{ secrets.CODECOV_ORG_TOKEN }}
197+ url : ${{ secrets.CODECOV_URL }}
198+
199+ - name : Upload coverage reports to codecov (Staging)
234200 if : ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
235- run : |
236- codecovcli -u ${{ secrets.CODECOV_STAGING_URL }} do-upload -t ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} --fail-on-error
201+ uses : codecov/codecov-action@v4
202+ with :
203+ token : ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
204+ url : ${{ secrets.CODECOV_STAGING_URL }}
205+
206+ - name : Upload test result reports to codecov
207+ if : ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
208+ uses : codecov/test-results-action@v1
209+ with :
210+ token : ${{ secrets.CODECOV_ORG_TOKEN }}
211+ url : ${{ secrets.CODECOV_URL }}
212+
213+ - name : Upload test result reports to codecov (Staging)
214+ if : ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
215+ uses : codecov/test-results-action@v1
216+ with :
217+ token : ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
218+ url : ${{ secrets.CODECOV_STAGING_URL }}
237219
238220 integration-test :
239221 name : Run Integration Tests (Node ${{ matrix.node-version }})
0 commit comments