-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
13 additions
and
149 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
name: Go CI | ||
|
||
name: go-header CI | ||
on: | ||
workflow_call: | ||
|
||
env: | ||
GO_VERSION: 1.19 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
lint: | ||
name: Lint | ||
|
@@ -20,12 +16,12 @@ jobs: | |
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
go-version: 1.20 | ||
|
||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.49.0 | ||
version: v1.52.1 | ||
|
||
go_mod_tidy_check: | ||
name: Go Mod Tidy Check | ||
|
@@ -36,46 +32,13 @@ jobs: | |
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
go-version: 1.20 | ||
|
||
- run: go mod tidy | ||
|
||
- name: check for diff | ||
run: git diff --exit-code | ||
|
||
test_coverage: | ||
name: Unit Tests Coverage | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Test & Coverage | ||
run: make cover | ||
- uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.txt | ||
|
||
unit_race_test: | ||
name: Run Unit Tests with Race Detector | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
run: git diff --exit-code | ||
|
||
- name: execute test run | ||
run: make test-unit-race | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -84,7 +47,7 @@ jobs: | |
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
go-version: 1.20 | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters