ci: Add unit test coverage enforcement for AdaptiveTelemetryProcessor (75% min) #562
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: e2e-tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+*" | |
| paths-ignore: | |
| - "**/README.md" | |
| pull_request: | |
| paths-ignore: | |
| - "**/README.md" | |
| merge_group: | |
| permissions: | |
| contents: read | |
| env: | |
| # Make sure to exit early if cache segment download times out after 2 minutes. | |
| # We limit cache download as a whole to 5 minutes. | |
| SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 | |
| jobs: | |
| collector-build: | |
| runs-on: ubuntu-24.04 | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| - run: ./.github/workflows/scripts/free-disk-space.sh | |
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6 | |
| id: go-setup | |
| with: | |
| go-version: oldstable | |
| cache-dependency-path: "**/*.sum" | |
| - name: Install dependencies | |
| if: steps.go-setup.outputs.cache-hit != 'true' | |
| run: make -j2 gomoddownload | |
| - name: Generate nrdotcol files | |
| run: make gennrdotcol | |
| - name: Build Collector | |
| run: make nrdotcol | |
| - name: Upload Collector Binary | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 | |
| with: | |
| name: collector-binary | |
| path: ./bin/* | |
| docker-build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| - run: ./.github/workflows/scripts/free-disk-space.sh | |
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6 | |
| id: go-setup | |
| with: | |
| go-version: oldstable | |
| cache-dependency-path: "**/*.sum" | |
| - name: Install dependencies | |
| if: steps.go-setup.outputs.cache-hit != 'true' | |
| run: make -j2 gomoddownload | |
| - name: Generate nrdotcol files | |
| run: make gennrdotcol | |
| - name: Build Docker Image | |
| run: | | |
| make docker-nrdotcol | |
| - name: export image to tar | |
| run: | | |
| docker save nrdotcol:latest > /tmp/nrdotcol.tar | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 | |
| with: | |
| name: nrdotcol | |
| path: /tmp/nrdotcol.tar |