mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-28 04:46:30 -04:00
Better CI
This commit is contained in:
+19
-11
@@ -3,11 +3,11 @@
|
||||
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
on: [push, pull_request]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: 'bash -Eeuo pipefail -x {0}'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -22,10 +22,18 @@ jobs:
|
||||
go-version: '1.20'
|
||||
|
||||
- name: Build
|
||||
run: cd examples && go mod tidy && go build syncat.go
|
||||
|
||||
run: go build -v
|
||||
- name: Test
|
||||
run: |
|
||||
FMT_ISSUES=$(gofmt -l .)
|
||||
if test -n "$FMT_ISSUES" ;then printf "gofmt found problems:\n$FMT_ISSUES\n";exit 11; fi
|
||||
go test -v
|
||||
run: |
|
||||
set -e
|
||||
go install github.com/go-critic/go-critic/cmd/gocritic@latest
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
go install golang.org/x/lint/golint@latest
|
||||
go install github.com/gordonklaus/ineffassign@latest
|
||||
pip install pre-commit
|
||||
pre-commit install
|
||||
pre-commit run --all-files
|
||||
go test -v
|
||||
|
||||
#- name: Test
|
||||
#run: go test -v
|
||||
|
||||
Reference in New Issue
Block a user