Reviewed-on: #28 Co-authored-by: Natercio Moniz <[email protected]>
This commit was merged in pull request #28.
This commit is contained in:
@@ -24,6 +24,37 @@ jobs:
|
||||
echo "has_go_changes=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
static-checks:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-changes
|
||||
if: needs.check-changes.outputs.has_go_changes == 'true'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.26
|
||||
cache: true
|
||||
|
||||
- name: Run go vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Check go mod tidy
|
||||
run: |
|
||||
go mod tidy
|
||||
if [ -n "$(git status --porcelain go.mod go.sum)" ]; then
|
||||
echo "go.mod or go.sum changed after go mod tidy; please run go mod tidy and commit the result" >&2
|
||||
git diff go.mod go.sum >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Run govulncheck
|
||||
run: |
|
||||
go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
govulncheck ./...
|
||||
|
||||
run-tests:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-changes
|
||||
@@ -35,7 +66,8 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.25
|
||||
go-version: 1.26
|
||||
cache: true
|
||||
|
||||
- name: Run Unit tests
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user