Skip to content

Update README.md

Update README.md #35

name: Validations
on:
push:
tags-ignore:
- '**'
branches:
- master
pull_request:
types:
- synchronize
- opened
jobs:
vet:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v2
with:
go-version: '1.15'
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: mod-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: go mod download
- run: go vet -x ./...
lint:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.31
test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v2
with:
go-version: '1.15'
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: mod-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: go mod download
- name: Run tests
run: go test -v -covermode=atomic -coverprofile coverage.out ./... 2>&1
- uses: paambaati/codeclimate-action@v2.7.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: sed -i -e "s~^github.com/croct-tech/[^/]*/~~" coverage.out
coverageLocations:
./coverage.out:gocov