You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-07-15 01:04:25 +02:00
Decouple codecov upload from coverage testing (#5534)
Do no repeat the whole coverage testing if the codecov upload fails. ### TODO - [ ] Copy these changes to contrib if this merges
This commit is contained in:
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
@ -5,8 +5,6 @@ on:
|
|||||||
- main
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
env:
|
env:
|
||||||
# Path to where test results will be saved.
|
|
||||||
TEST_RESULTS: /tmp/test-results
|
|
||||||
# Default version of Go to use by CI workflows. This should be the latest
|
# Default version of Go to use by CI workflows. This should be the latest
|
||||||
# release of Go; developers likely use the latest release in development and
|
# release of Go; developers likely use the latest release in development and
|
||||||
# we want to catch any bugs (e.g. lint errors, race detection) with this
|
# we want to catch any bugs (e.g. lint errors, race detection) with this
|
||||||
@ -95,12 +93,20 @@ jobs:
|
|||||||
check-latest: true
|
check-latest: true
|
||||||
cache-dependency-path: "**/go.sum"
|
cache-dependency-path: "**/go.sum"
|
||||||
- name: Run coverage tests
|
- name: Run coverage tests
|
||||||
run: |
|
run: make test-coverage
|
||||||
make test-coverage
|
- name: Store coverage test output
|
||||||
mkdir $TEST_RESULTS
|
uses: actions/upload-artifact@v4
|
||||||
cp coverage.out $TEST_RESULTS
|
with:
|
||||||
cp coverage.txt $TEST_RESULTS
|
name: coverage-artifacts-${{ env.DEFAULT_GO_VERSION }}
|
||||||
cp coverage.html $TEST_RESULTS
|
path: coverage.txt
|
||||||
|
|
||||||
|
codecov:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [test-coverage]
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
pattern: coverage-artifacts-${{ env.DEFAULT_GO_VERSION }}
|
||||||
- name: Upload coverage report
|
- name: Upload coverage report
|
||||||
uses: codecov/codecov-action@v4.5.0
|
uses: codecov/codecov-action@v4.5.0
|
||||||
env:
|
env:
|
||||||
@ -108,11 +114,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
file: ./coverage.txt
|
file: ./coverage.txt
|
||||||
verbose: true
|
verbose: true
|
||||||
- name: Store coverage test output
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: opentelemetry-go-test-output
|
|
||||||
path: ${{ env.TEST_RESULTS }}
|
|
||||||
|
|
||||||
compatibility-test:
|
compatibility-test:
|
||||||
strategy:
|
strategy:
|
||||||
|
Reference in New Issue
Block a user