Bump golang.org/x/net from 0.54.0 to 0.55.0 #460
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 coverage | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| branches: ["main"] | |
| push: | |
| branches: ["main"] | |
| # run at least once every 2 months to prevent the coverage artifact from expiring | |
| schedule: | |
| - cron: '14 3 3 */2 *' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| go-coverage: | |
| name: Go coverage | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| pull-requests: write # Required by go-coverage-report to comment on PRs | |
| id-token: write # Required to upload coverage to Codecov via OIDC | |
| steps: | |
| - name: Harden runner | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| path: ${{ github.workspace }}/src/github.com/tektoncd/triggers | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 | |
| with: | |
| go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/triggers/go.mod" | |
| - name: Generate coverage | |
| working-directory: ${{ github.workspace }}/src/github.com/tektoncd/triggers | |
| run: | | |
| go test -coverprofile=coverage.out -covermode=atomic ./... || true | |
| echo "Generated coverage profile" | |
| - name: Archive coverage results | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: code-coverage | |
| path: ${{ github.workspace }}/src/github.com/tektoncd/triggers/coverage.out | |
| - name: Comment on PR | |
| if: github.event_name == 'pull_request' | |
| uses: fgrosse/go-coverage-report@cbeb2ab2e32591d690337146ba02a911cc566f3f # v1.3.0 | |
| continue-on-error: true # This may fail if artifact on main branch does not exist (first run or expired) | |
| with: | |
| coverage-artifact-name: "code-coverage" | |
| coverage-file-name: "coverage.out" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2 | |
| continue-on-error: true # job still "succeeds" even if this step fails | |
| with: | |
| files: ${{ github.workspace }}/src/github.com/tektoncd/triggers/coverage.out | |
| flags: unit-tests | |
| use_oidc: true | |
| fail_ci_if_error: false |