Skip to content

chore(deps): update codecov/codecov-action action to v5 (#343) #426

chore(deps): update codecov/codecov-action action to v5 (#343)

chore(deps): update codecov/codecov-action action to v5 (#343) #426

Workflow file for this run

name: go
on:
pull_request:
push:
branches:
- main
jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
go: ${{ steps.filter.outputs.go }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
go:
- 'contents/kubernetes-operator/**.go'
- .github/workflows/go.yml
- '**go**'
status-check-go:
runs-on: ubuntu-latest
needs:
- test
- golangci-lint
permissions: {}
if: failure()
steps:
- run: exit 1
test:
needs: changes
if: ${{ needs.changes.outputs.go == 'true' }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: test
run: go test -coverprofile="coverage.txt" -covermode=atomic ./...
working-directory: contents/kubernetes-operator
- name: coverage
uses: codecov/codecov-action@v5
golangci-lint:
needs: changes
if: ${{ needs.changes.outputs.go == 'true' }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
go_version_file: go.mod