Skip to content

FloatMS (#17)

FloatMS (#17) #53

Workflow file for this run

name: build
on:
push:
tags:
- v*
branches:
- master
pull_request:
jobs:
unit-tests:
name: unit-tests
strategy:
matrix:
go-version: [ 1.17.x, 1.18.x ] # support latest 2 major versions
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Download deps
run: go mod download
- name: Test
run: make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt
fail_ci_if_error: true
lint:
name: lint
strategy:
matrix:
go-version: [ 1.17.x, 1.18.x ] # support latest 2 major versions
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
# TODO: switch to .golangci.yml
args: >
--tests=false
-E bodyclose -E golint -E rowserrcheck -E gosec -E interfacer
-E unconvert -E dupl -E goconst -E gocognit -E goimports -E maligned -E unparam
-E dogsled -E prealloc -E gocritic -E wsl -E goprintffuncname
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true