Skip to content

Commit

Permalink
add github action (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
geseq committed Jul 2, 2021
1 parent 6c797d8 commit 8dffac5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 30 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build:
env:
CC_TEST_REPORTER_ID: 68feaa3410049ce73e145287acbcdacc525087a30627f96f04e579e75bd71c00
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.14', '1.15' ]
steps:
- uses: actions/checkout@v2

- name: Pre-run
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
curl -sL https://taskfile.dev/install.sh | sh
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Setup go module cache
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
run: diff -u <(echo -n) <(./bin/task lint)

- name: Test
run: ./bin/task test-coverage

- name: Post run
run: ./cc-test-reporter after-build --exit-code $?

30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

0 comments on commit 8dffac5

Please sign in to comment.