Skip to content

Commit

Permalink
github: Format workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Nov 28, 2023
1 parent 2fd19a1 commit eb6bef0
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [ main ]
branches: [main]
pull_request:
name: Test
permissions:
Expand All @@ -9,31 +9,31 @@ jobs:
test:
strategy:
matrix:
go-version: [1.19.x,1.20.x,1.21.x]
go-version: [1.19.x, 1.20.x, 1.21.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install staticcheck
if: matrix.go-version == '1.20.x'
run: go install honnef.co/go/tools/cmd/staticcheck@latest
shell: bash
- name: Update PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- name: Checkout code
uses: actions/checkout@v1
- name: Fmt
if: matrix.platform != 'windows-latest' # :(
run: "diff <(gofmt -d .) <(printf '')"
shell: bash
- name: Vet
run: go vet ./...
- name: Staticcheck
if: matrix.go-version == '1.20.x'
run: staticcheck ./...
- name: Test
run: go test -race ./...
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install staticcheck
if: matrix.go-version == '1.21.x'
run: go install honnef.co/go/tools/cmd/staticcheck@latest
shell: bash
- name: Update PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- name: Checkout code
uses: actions/checkout@v1
- name: Fmt
if: matrix.platform != 'windows-latest' # :(
run: "diff <(gofmt -d .) <(printf '')"
shell: bash
- name: Vet
run: go vet ./...
- name: Staticcheck
if: matrix.go-version == '1.21.x'
run: staticcheck ./...
- name: Test
run: go test -race ./...

0 comments on commit eb6bef0

Please sign in to comment.