Skip to content

Commit

Permalink
updated CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lmittmann committed Jun 16, 2024
1 parent c4b4292 commit 069f95f
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
name: Go

on:
- push
- pull_request
push:
branches:
- main
pull_request:

jobs:
fmt_vet:
name: Fmt & Vet
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: "1.21"
- name: go fmt
run: |
gofmt -s -d . > fmt.out
cat fmt.out
test -z $(cat fmt.out)
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 ./...

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: "1.21"
- name: go test
run: TZ="" go test ./... -tags=faketime

0 comments on commit 069f95f

Please sign in to comment.