Skip to content

Commit

Permalink
add GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed May 11, 2020
1 parent 94a87a7 commit 385666a
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'push'

on:
push:
pull_request:

env:
GO111MODULE: on

jobs:

test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu, windows, macOS ]
go: [ 1.12.x, 1.13.x, 1.14.x ]

runs-on: ${{ matrix.os }}-latest

steps:

- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}

- uses: actions/checkout@v2

- name: Run tests
shell: bash
run: |
go get -v github.com/kyoh86/richgo@v0.3.3
$HOME/go/bin/richgo test -v ./...
- name: Check formatting
if: matrix.os != 'windows'
run: diff -u <(echo -n) <(gofmt -d -s .)

- name: Build
run: |
cd cobra
go build
- name: go vet
if: matrix.os != 'windows'
run: |
if [ -z $NOVET ]; then
diff -u <(echo -n) <(go vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint');
fi

0 comments on commit 385666a

Please sign in to comment.