Skip to content

Fix: Add useHttpPath to support multiple Git credentials on same host #747

Fix: Add useHttpPath to support multiple Git credentials on same host

Fix: Add useHttpPath to support multiple Git credentials on same host #747

Workflow file for this run

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 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@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: ${{ github.workspace }}/src/github.com/tektoncd/pipeline
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/pipeline/go.mod"
- name: Generate coverage
working-directory: ${{ github.workspace }}/src/github.com/tektoncd/pipeline
run: |
go test -cover -coverprofile=coverage.txt ./... || true
echo "Generated coverage profile"
- name: Archive coverage results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: code-coverage
path: ${{ github.workspace }}/src/github.com/tektoncd/pipeline/coverage.txt
- name: Comment on PR
if: github.event_name == 'pull_request'
uses: fgrosse/go-coverage-report@8c1d1a09864211d258937b1b1a5b849f7e4f2682 # v1.2.0
continue-on-error: true # This may fail if artifact on main branch does not exist (first run or expired)
env:
GITHUB_TOKEN: ${{ secrets.CHATOPS_TOKEN }}
with:
coverage-artifact-name: "code-coverage"
coverage-file-name: "coverage.txt"