From 8fe87a389d9aea126571fa08ab78e446ff4d7045 Mon Sep 17 00:00:00 2001 From: Christian Rebischke Date: Sun, 6 Sep 2020 15:22:50 +0200 Subject: [PATCH] add Go Actions This adds Github Actions as CI. --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f651fca --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +on: [push, pull_request] +name: build +jobs: + build: + strategy: + matrix: + go-version: [1.13.x, 1.14.x, 1.15.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Format Unix + if: runner.os == 'Linux' + run: test -z $(go fmt ./...) + - name: Test + run: go test -covermode atomic -coverprofile='profile.cov' ./... + - name: Send coverage + if: runner.os == 'Linux' + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + GO111MODULE=off go get github.com/mattn/goveralls + $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github \ No newline at end of file