w3types: fix merge of account with empty code #776
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: Go | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: go fmt | |
run: | | |
output=$(gofmt -s -d .) | |
echo "$output" | |
test -z "$output" | |
- name: go vet | |
run: go vet ./... | |
- name: install staticcheck | |
run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: staticcheck | |
run: staticcheck ./... | |
- name: go mod tidy | |
run: | | |
go mod tidy | |
cd examples/ && go mod tidy | |
if [[ `git status --porcelain` ]]; then | |
echo "workspace is not tidy" | |
git diff --color | |
exit 1 | |
else | |
echo "workspace is tidy" | |
fi | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: go test | |
run: go test -covermode atomic -coverprofile=covprofile ./... | |
- name: install goveralls | |
run: go install github.com/mattn/goveralls@latest | |
- name: send coverage | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: goveralls -coverprofile=covprofile -service=github |