Skip to content

Merge pull request #43 remove deprecated code #160

Merge pull request #43 remove deprecated code

Merge pull request #43 remove deprecated code #160

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
env:
GO_VERSION: "1.18"
strategy:
matrix:
goVersion:
- "1.16" # oldest supported
- "1.18" # first with generic
- "oldstable" # prev go version
- "stable" # latest stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.goVersion }}
- name: Build
run: go build -v ./...
- name: Build examples
if: ${{ matrix.goVersion == env.GO_VERSION }}
run: cd examples; go build -v ./...
- name: Test
run: go test ./...
- name: Test examples
if: ${{ matrix.goVersion == env.GO_VERSION }}
run: cd examples; go test ./...
- name: Test library with coverage profiler
if: ${{ matrix.goVersion == env.GO_VERSION }}
run: go test -test.count=10 -race -covermode atomic -coverprofile=covprofile.out ./...
- name: golangci-lint
if: ${{ matrix.goVersion == env.GO_VERSION }}
uses: golangci/golangci-lint-action@v2
with:
version: latest
- name: golangci-lint examples
if: ${{ matrix.goVersion == env.GO_VERSION }}
uses: golangci/golangci-lint-action@v2
with:
version: latest
working-directory: examples
- name: Coveralls install goveralls
if: ${{ matrix.goVersion == env.GO_VERSION }}
run: go install github.com/mattn/goveralls@latest
- name: Coveralls push
if: ${{ matrix.goVersion == env.GO_VERSION }}
run: goveralls -coverprofile=covprofile.out -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}