Skip to content

feat: stub with bytes #13

feat: stub with bytes

feat: stub with bytes #13

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
strategy:
matrix:
go-version: [1.18.x, 1.19.x, tip]
lint-and-coverage: [false]
include:
- go-version: 1.20.x
lint-and-coverage: true
runs-on: ubuntu-latest
steps:
- name: Setup go
run: |
curl -sL https://raw.githubusercontent.com/maxatome/install-go/v3.4/install-go.pl |
perl - ${{ matrix.go-version }} $HOME/go
- name: Checkout code
uses: actions/checkout@v2
- name: Linting
if: matrix.lint-and-coverage
run: |
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh |
sh -s -- -b $HOME/go/bin v1.52.2
$HOME/go/bin/golangci-lint run ./...
- name: Testing
continue-on-error: ${{ matrix.go-version == 'tip' }}
run: |
go version
if [ ${{ matrix.lint-and-coverage }} = true ]; then
GO_TEST_OPTS="-covermode=atomic -coverprofile=coverage.out"
fi
export GORACE="halt_on_error=1"
go test -race $GO_TEST_OPTS ./...
- name: Reporting coverage
if: matrix.lint-and-coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go install github.com/mattn/[email protected]
goveralls -coverprofile=coverage.out -service=github