Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple codecov upload from coverage testing #5534

Merged
merged 9 commits into from
Jun 24, 2024
28 changes: 15 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
- main
pull_request:
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
# 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
Expand Down Expand Up @@ -95,24 +93,28 @@ jobs:
check-latest: true
cache-dependency-path: "**/go.sum"
- name: Run coverage tests
run: |
make test-coverage
mkdir $TEST_RESULTS
cp coverage.out $TEST_RESULTS
cp coverage.txt $TEST_RESULTS
cp coverage.html $TEST_RESULTS
run: make test-coverage
- name: Store coverage test output
uses: actions/upload-artifact@v4
with:
name: coverage-artifacts-${{ env.DEFAULT_GO_VERSION }}
path: coverage.txt

codecov:
runs-on: ubuntu-latest
needs: [test-coverage]
steps:
- uses: actions/checkout@v4
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/download-artifact@v4
with:
pattern: coverage-artifacts-${{ env.DEFAULT_GO_VERSION }}
- name: Upload coverage report
uses: codecov/codecov-action@v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.txt
verbose: true
- name: Store coverage test output
uses: actions/upload-artifact@v4
with:
name: opentelemetry-go-test-output
path: ${{ env.TEST_RESULTS }}

compatibility-test:
strategy:
Expand Down