Skip to content

Commit

Permalink
Introduce common GitHub Action build and test
Browse files Browse the repository at this point in the history
Sync all gonvenience packages to use GitHub Action for build and test..
  • Loading branch information
HeavyWombat committed Feb 17, 2021
1 parent 47e2d39 commit ba3a213
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 24 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: Build and Tests

on:
push:
tags-ignore:
- '**'
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build and Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15

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

- name: Verify Go Modules Setup
run: |
go mod verify
- name: Build Go Code
run: |
go build ./...
- name: Sanity Check (go vet)
run: |
go vet ./...
- name: Sanity Check (ineffassign)
run: |
go get github.com/gordonklaus/ineffassign
ineffassign ./...
- name: Sanity Check (golint)
run: |
go get golang.org/x/lint/golint
golint ./...
- name: Sanity Check (misspell)
run: |
go get github.com/client9/misspell/cmd/misspell
find . -type f | xargs misspell -source=text -error
- name: Sanity Check (staticcheck)
run: |
go get honnef.co/go/tools/cmd/staticcheck
staticcheck ./...
- name: Run Go Unit Tests
run: |
go get github.com/onsi/ginkgo/ginkgo github.com/onsi/gomega/...
ginkgo -randomizeAllSpecs -randomizeSuites -failOnPending -nodes=1 -compilers=1 -race -trace -cover
- name: Upload Code Coverage Profile
uses: codecov/codecov-action@v1
with:
files: ./*.coverprofile
flags: unittests
fail_ci_if_error: true
verbose: false
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

0 comments on commit ba3a213

Please sign in to comment.