Skip to content

Commit

Permalink
Add tests action (#10)
Browse files Browse the repository at this point in the history
Run tests for PR updates
  • Loading branch information
vladem authored Oct 13, 2023
1 parent ab39ea9 commit 69652c0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Check style
run: make check_style

- name: Build
run: make bin

- name: Test
run: go test -v -race ./pkg/...
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ test:
go test -v -race ./pkg/...
go test -v ./tests/sanity/...

.PHONY: fmt
fmt:
go fmt ./...

.PHONY: check_style
check_style:
test -z "$$(gofmt -d . | tee /dev/stderr)"

.PHONY: clean
clean:
rm -rf bin/ && docker system prune

0 comments on commit 69652c0

Please sign in to comment.