Files
0x6f736f646f ee1c557ea7 Remove windows
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
2022-08-11 14:31:12 +03:00

61 lines
1.5 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
strategy:
matrix:
go-version: [1.17.x, 1.18.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Verify dependencies
run: go mod verify
- name: Run go vet
run: go vet ./...
- name: Build
run: go build -v ./...
- name: Lint with golangci-lint
run: |
export GOBIN=$HOME/go/bin
echo $(go env GOBIN)
export PATH=$PATH:$(go env GOBIN)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOBIN) v1.46.2
echo "Running lint..."
golangci-lint run --no-config --disable-all --enable gosimple --enable govet --enable unused --enable deadcode --timeout 3m
- name: Install golint
run: go install golang.org/x/lint/golint@latest
- name: Run golint
run: golint ./...
- name: Run tests
run: go test -mod=vendor -v -vet=off -covermode=count -coverprofile cover.out ./...
# - name: Convert coverage.out to coverage.lcov
# uses: jandelgado/gcov2lcov-action@v1.0.6
# - name: Coveralls
# uses: coverallsapp/github-action@v1.1.2
# with:
# github-token: ${{ secrets.github_token }}
# path-to-lcov: coverage.lcov