Memory measurement #9354
Workflow file for this run
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: Go-CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| merge_group: | |
| # Cancel in-progress runs on new commits to same PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test_and_coverage: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| folder: | |
| - pkg/otel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version: "1.26.0" | |
| - name: Run tests with coverage | |
| run: go test -cover -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... ./... | |
| working-directory: ./go/${{ matrix.folder }} | |
| - name: Upload to codecov.io | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| fail_ci_if_error: true | |
| gen_otelarrowcol: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version: "1.26.0" | |
| - name: Build the test collector | |
| run: make otelarrowcol | |
| codeql: | |
| permissions: | |
| # needed for codeql | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version: "1.26.0" | |
| - uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 | |
| with: | |
| languages: go | |
| - uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 | |
| timeout-minutes: 60 | |
| # Aggregated status check for all Go CI jobs | |
| # This job can be set as a required status check in GitHub branch protection | |
| # to simplify maintenance - add/remove jobs from the needs list as needed | |
| go-required-status-check: | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - test_and_coverage | |
| - gen_otelarrowcol | |
| - codeql | |
| steps: | |
| - name: Check if all jobs succeeded | |
| run: | | |
| # Check if any required job failed or was cancelled | |
| if [[ "${{ needs.test_and_coverage.result }}" != "success" ]]; then | |
| echo "test_and_coverage failed or was cancelled" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.gen_otelarrowcol.result }}" != "success" ]]; then | |
| echo "gen_otelarrowcol failed or was cancelled" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.codeql.result }}" != "success" ]]; then | |
| echo "codeql failed or was cancelled" | |
| exit 1 | |
| fi | |
| echo "All required checks passed!" |