Skip to content

Commit

Permalink
Merge pull request #159 from commitdev/158-run-tests-github-actions
Browse files Browse the repository at this point in the history
158 run tests GitHub actions
  • Loading branch information
Direside committed Jun 18, 2020
2 parents 979e9a4 + 6e302ed commit 6f1b217
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/config.yml
@@ -0,0 +1,19 @@
on:
pull_request:
branches:
- master

jobs:
unit_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.12
- name: Download Go Packages
run: |
make deps
- name: Run Go Tests
run: |
make check
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -3,8 +3,11 @@ BUILD ?=$(shell git rev-parse --short HEAD)
PKG ?=github.com/commitdev/zero
BUILD_ARGS=-v -ldflags=all="-X ${PKG}/cmd.appVersion=${VERSION} -X ${PKG}/cmd.appBuild=${BUILD}"

deps:
go mod download

check:
go test ./...
go list -f '{{.Dir}}' ./... | grep -v /tmp/ | xargs go test -v

fmt:
go fmt ./...
Expand Down

0 comments on commit 6f1b217

Please sign in to comment.