Skip to content

Commit

Permalink
Merge pull request #10 from hazcod/feat/cicd-tests
Browse files Browse the repository at this point in the history
Add tests in CI/CD
  • Loading branch information
hazcod authored Jul 6, 2020
2 parents 9905a41 + 90332da commit 77ec428
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: test
on: pull_request

jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v2
-
id: vars
run: |
echo ::set-output name=go_version::$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2)
echo "Using Go version ${{ steps.vars.outputs.go_version }}"
-
name: Setup go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.vars.outputs.go_version }}
-
name: Download Go modules
run: go mod download
-
name: Run Go Tests
run: go test -v $(go list ./... | grep -v /vendor/)

0 comments on commit 77ec428

Please sign in to comment.