fix(deps): update golang.org/x (#1455) #5771
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| env: | |
| # Path to where test results will be saved. | |
| TEST_RESULTS: /tmp/test-results | |
| jobs: | |
| lint: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6 | |
| with: | |
| go-version: oldstable | |
| check-latest: true | |
| - name: Checkout Repo | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Module cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| env: | |
| cache-name: go-mod-cache | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} | |
| - name: Tools cache | |
| id: cache-tools | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| env: | |
| cache-name: go-tools-cache | |
| with: | |
| path: .tools | |
| key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }} | |
| - name: Install tools | |
| if: steps.cache-tools.outputs.cache-hit != 'true' | |
| run: make tools | |
| - name: Add .exe to tools on Windows | |
| if: matrix.os == 'windows-latest' | |
| shell: bash | |
| run: | | |
| for file in ./.tools/*; do | |
| cp "$file" "${file}.exe" | |
| done | |
| - name: Run linters | |
| run: make multimod-verify license-check lint | |
| - name: Build | |
| run: make build | |
| - name: Check clean repository | |
| run: make check-clean-work-tree | |
| test-race: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6 | |
| with: | |
| go-version: oldstable | |
| check-latest: true | |
| - name: Checkout Repo | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup Environment | |
| run: | | |
| echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
| echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Module cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| env: | |
| cache-name: go-mod-cache | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} | |
| - name: Run tests with race detector | |
| run: make test-race | |
| test-coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6 | |
| with: | |
| go-version: oldstable | |
| check-latest: true | |
| - name: Checkout Repo | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup Environment | |
| run: | | |
| echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
| echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Module cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| env: | |
| cache-name: go-mod-cache | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/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 | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 | |
| with: | |
| file: ./coverage.txt | |
| fail_ci_if_error: true | |
| verbose: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Store coverage test output | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 | |
| with: | |
| name: opentelemetry-go-test-output | |
| path: ${{ env.TEST_RESULTS }} | |
| check-lint: | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| if: always() | |
| steps: | |
| - name: Test if lint passed | |
| run: | | |
| echo ${{ needs.lint.result }} | |
| test ${{ needs.lint.result }} == "success" | |
| check-test-race: | |
| runs-on: ubuntu-latest | |
| needs: [test-race] | |
| if: always() | |
| steps: | |
| - name: Test if test-race passed | |
| run: | | |
| echo ${{ needs.test-race.result }} | |
| test ${{ needs.test-race.result }} == "success" |