Merge pull request #43 remove deprecated code #160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |