fixed error formatting
This commit is contained in:
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24.3'
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Install Fyne dependencies
|
||||
run: |
|
||||
@@ -26,6 +26,12 @@ jobs:
|
||||
- name: Install Fyne CLI
|
||||
run: go install fyne.io/fyne/v2/cmd/fyne@latest
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
echo "CGO_ENABLED=1" >> $GITHUB_ENV
|
||||
echo "GOOS=darwin" >> $GITHUB_ENV
|
||||
echo "GOARCH=arm64" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -40,6 +46,17 @@ jobs:
|
||||
- name: Verify dependencies
|
||||
run: go mod verify
|
||||
|
||||
- name: Check code formatting
|
||||
run: |
|
||||
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
|
||||
echo "Code is not properly formatted. Please run 'gofmt -s -w .'"
|
||||
gofmt -s -l .
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Run go vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
|
||||
|
Reference in New Issue
Block a user