fixed error formatting

This commit is contained in:
aomizu
2025-06-04 11:30:45 +09:00
parent 3a2d10b17b
commit e5ff89b8c6
6 changed files with 51 additions and 25 deletions

View File

@@ -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 ./...