Update securego/gosec action to v2.19.0 #422
Workflow file for this run
This file contains 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: Coverage | |
on: | |
push: | |
branches: | |
- master | |
pull_request_review: | |
types: [submitted] | |
pull_request: | |
branches: | |
- master | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
if: ${{ (github.event.review.state == 'approved') || github.ref == 'refs/heads/master' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: create k8s Kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.24.12 | |
cluster_name: cluster-coverage | |
config: testutils/kind.yaml | |
version: v0.18.0 | |
- name: set directories to cover | |
run: echo "COVERPKG=$(go list ./... | grep -v apis | grep -v tests | tr '\n' ',')" >> $GITHUB_ENV | |
- name: run coverage | |
run: go test -covermode=atomic -race -coverprofile ./coverage.txt -coverpkg ${{ env.COVERPKG }} ./tests/... | |
- name: report coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.txt | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |