Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract gomodifytags into a library #89

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 33 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,50 @@
name: build
on: [push, pull_request]
jobs:

on:
push:
branches:
- main
pull_request:

jobs:
test-build:
name: Test & Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.15
uses: actions/setup-go@v1
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go
go-version: ^1.17

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Run go mod tidy
run: |
set -e
go mod tidy
output=$(git status -s)
if [ -z "${output}" ]; then
exit 0
fi
echo 'We wish to maintain a tidy state for go mod. Please run `go mod tidy` on your branch, commit and push again.'
echo 'Running `go mod tidy` on this CI test yields with the following changes:'
echo "$output"
exit 1

- name: Test
run: |
go mod tidy -v
go test -race ./...

- name: Go vet
run: "go vet ./..."

- name: Staticcheck
uses: dominikh/[email protected]
with:
version: "2021.1.1"
install-go: false

- name: Build
run: go build ./...
Loading