Skip to content

Commit

Permalink
update .github/workflows/go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Oct 23, 2024
1 parent 5ba5e6a commit 53b690d
Showing 1 changed file with 35 additions and 24 deletions.
59 changes: 35 additions & 24 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ name: Go

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:

build:
strategy:
fail-fast: false
Expand All @@ -19,24 +18,36 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22

- name: Build
run: go build -v

- name: Build sub-packages
run: go build -v ./...

- name: Build nogui
run: go build -v -tags nogui

- name: Test
run: go test -v ./...

- name: Install
run: go install github.com/ilius/ayandict@main
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22

- name: Build
run: go build -v

- name: Build sub-packages
run: go build -v ./...

- name: Build nogui
run: go build -v -tags nogui

- name: Test
run: go test -v ./...

- name: gofumpt
run: |
go install mvdan.cc/gofumpt@latest
gofumpt -w .
CHANGES=$(git diff --name-only HEAD --)
if [ -n "$CHANGES" ] ; then
echo "There are changes after running gofumpt:"
echo "$CHANGES"
git diff
exit 1
fi
- name: Install
run: go install github.com/ilius/ayandict@main

0 comments on commit 53b690d

Please sign in to comment.