no needs strip dependency_resolve bin #5
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: Golang CI | |
on: | |
workflow_dispatch: | |
pull_request_target: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
- name: Install dependencies | |
run: go mod download | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
- name: Check formatting | |
run: | | |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then | |
echo "The following files are not formatted correctly:" | |
gofmt -s -l . | |
exit 1 | |
fi |