Skip to content

Commit

Permalink
Add build and test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmaguire committed Jan 25, 2024
1 parent 8ace84d commit 786fcbc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build and test
on: [push]

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.21.x'

- name: Build binary
run: make build

- name: Run tests
run: make testv
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ dev: bin
fmt:
goimports -w .


test:
go test ./...
go test $(TEST_FLAGS) $(shell go list ./...)

testv: TEST_FLAGS += -v
testv: test

vet:
go vet ./...
Expand Down

0 comments on commit 786fcbc

Please sign in to comment.