Skip to content

chore(deps): bump actions/setup-go from 6.3.0 to 6.4.0 #392

chore(deps): bump actions/setup-go from 6.3.0 to 6.4.0

chore(deps): bump actions/setup-go from 6.3.0 to 6.4.0 #392

Workflow file for this run

name: Go coverage
permissions:
contents: read
'on':
pull_request:
branches: [main]
merge_group:
branches: [main]
push:
branches: [main]
# run at least once every 2 months to prevent the coverage artifact from expiring
schedule:
- cron: '14 3 2 */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
steps:
- name: Harden runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: ${{ github.workspace }}/src/github.com/tektoncd/pruner
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/pruner/go.mod"
- name: Generate coverage
working-directory: ${{ github.workspace }}/src/github.com/tektoncd/pruner
run: |
go test -cover -coverprofile=coverage.txt ./... || true
echo "Generated coverage profile"
- name: Archive coverage results
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: code-coverage
path: ${{ github.workspace }}/src/github.com/tektoncd/pruner/coverage.txt
- 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:
token: ${{ secrets.CHATOPS_TOKEN }}
coverage-artifact-name: "code-coverage"
coverage-file-name: "coverage.txt"