diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bcc5f2a83a..9b9a4ac5819 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,3 +138,48 @@ jobs: run: | echo ${{ needs.compatibility-test.result }} test ${{ needs.compatibility-test.result }} == "success" + + integration: + strategy: + matrix: + target: [test-mongo-driver] + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.DEFAULT_GO_VERSION }} + check-latest: true + cache-dependency-path: "**/go.sum" + - name: Run coverage tests ${{ matrix.target }} + env: + INTEGRATION: ${{ matrix.target }} + run: | + make ${{ matrix.target }} + mkdir -p $TEST_RESULTS + find . -name 'coverage.html' > "${TEST_RESULTS}/coverage.lst" + tar -n -cf - -T "${TEST_RESULTS}/coverage.lst" | tar -C "${TEST_RESULTS}" -xvf - + - name: Upload coverage report + uses: codecov/codecov-action@v4.5.0 + if: hashFiles('coverage.out') != '' + with: + file: ./coverage.out + fail_ci_if_error: true + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + - name: Store coverage test output + uses: actions/upload-artifact@v4 + with: + name: opentelemetry-go-contrib-integration-test-output + path: ${{ env.TEST_RESULTS }} + + test-integration: + runs-on: ubuntu-latest + needs: [integration] + steps: + - name: Test if integration workflow passed + run: | + echo ${{ needs.integration.result }} + test ${{ needs.integration.result }} == "success"