ci: overall enhancements and cosmetics improvements (#134)

* ci: cosmetic renaming CI jobs

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>

* chore: overrall Makefile enhancements

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
This commit is contained in:
Khosrow Moossavi 2021-03-31 12:41:24 -04:00 committed by GitHub
parent b02996e027
commit 8d9e00b699
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 122 additions and 56 deletions

View file

@ -1,35 +1,57 @@
name: tests
name: ci
on:
pull_request:
types: ['opened', 'synchronize']
types: ["opened", "synchronize"]
paths-ignore:
- 'README.md'
- "README.md"
push:
branches:
- master
paths-ignore:
- 'README.md'
- "README.md"
env:
GO_VERSION: "1.16"
jobs:
unit:
tests:
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: ${{ env.GO_VERSION }}
- name: Run tests
run: |
make test
run: make test
- name: Install goveralls
run: go get github.com/mattn/goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Send coverage
run: goveralls -coverprofile=cover.out -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=cover.out -service=github
lint:
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.38

View file

@ -1,18 +0,0 @@
name: lint
on:
pull_request:
types: ['opened', 'synchronize']
push:
branches:
- master
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.38

View file

@ -1,22 +1,28 @@
name: goreleaser
name: release
on:
push:
tags:
- '*'
- "*"
env:
GO_VERSION: "1.16"
jobs:
goreleaser:
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: ${{ env.GO_VERSION }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with: