Skip to content

🌱 Update Update Golang Dependencies group (minor) #3080

🌱 Update Update Golang Dependencies group (minor)

🌱 Update Update Golang Dependencies group (minor) #3080

Workflow file for this run

name: Test Code
# yamllint disable rule:line-length
on: # yamllint disable-line rule:truthy
workflow_dispatch:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]
branches:
- main
- "releases/**"
paths:
- "**.go"
- "**go.mod"
- "**go.sum"
- ".github/workflows/**"
- "Makefile"
- "images/builder/**"
- "images/caph/**"
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
cancel-in-progress: true
jobs:
test:
name: Test Code
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Coverage result name
id: name
run: |
if [ ${{ github.event.pull_request }} ]; then
NAME=pr-${{ github.event.pull_request.number }}
else
NAME=${{ github.sha }}
fi
echo name=${NAME} >> $GITHUB_OUTPUT
- name: Install go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: "go.mod"
- name: Install dependencies
run: make gotestsum go-cover-treemap setup-envtest
- name: Install go modules for test
shell: bash
run: |
cd test && go mod download
- name: Running tests
run: make test-unit
- name: Create Report
run: make report-cover-html report-cover-treemap
- name: Test Summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: ".coverage/junit.xml"
- name: Upload Report
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: reports-${{ steps.name.outputs.name }}
path: .reports
retention-days: 30