fix: do nothing when validating webhooks is empty #305
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: Lint & Unit Test | |
on: | |
push: | |
branches: | |
- master | |
- main | |
paths: | |
- '**.go' | |
pull_request: | |
paths: | |
- '**.go' | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: golangci-lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.15 | |
- uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.47.3 | |
unit-test: | |
strategy: | |
matrix: | |
go: [1.15] | |
name: unit-test | |
needs: [lint] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Set Prefix | |
id: prefix | |
run: | | |
echo "PREFIX=$(go list -m)" >> $GITHUB_OUTPUT | |
- uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: e47aa5e6270db938ee1bdd6dc9486f4f581beb1bcaee5d28be1633d68c8550c6 | |
with: | |
coverageLocations: | | |
${{github.workspace}}/coverage.out:gocov | |
coverageCommand: go test -v -coverprofile=coverage.out ./... | |
prefix: ${{ steps.prefix.outputs.PREFIX }} |