diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 8765ef5..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Go -on: [push] -jobs: - - build: - name: Build - runs-on: ubuntu-latest - steps: - - - name: Set up Go 1.15 - uses: actions/setup-go@v2 - with: - go-version: 1.15 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Get dependencies - run: | - go get -v -t -d ./... - - - name: Build - run: go build -v . diff --git a/.github/workflows/golang.yml b/.github/workflows/golang.yml new file mode 100644 index 0000000..eea3175 --- /dev/null +++ b/.github/workflows/golang.yml @@ -0,0 +1,29 @@ +name: Golang +on: [push] +env: + GO111MODULE: on +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Setup Go for use with actions + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Run tests + run: go test -race -covermode atomic -coverprofile=covprofile ./... + - name: Install goveralls + env: + GO111MODULE: off + run: go get github.com/mattn/goveralls + - name: Send coverage + env: + COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} + run: goveralls -coverprofile=covprofile \ No newline at end of file diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml new file mode 100644 index 0000000..fd3e03f --- /dev/null +++ b/.github/workflows/golangci.yml @@ -0,0 +1,13 @@ +name: golangci +on: [push] +env: + GO111MODULE: on +jobs: + golangci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.35