fix readme #62
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
name: Main CI WorkFlow | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
pull_request: | |
env: | |
GO_VERSION: '1.16' | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: go get -v -t -d ./... | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
unit-tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: go get -v -t -d ./... | |
- name: Test and Coverage | |
run: go test -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./... ./... | |
- name: Publish Unit Test Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
name: swag | |
flags: all | |
files: ./coverage.out | |
fail_ci_if_error: true | |
verbose: true | |
token: ${{ secrets.CODECOV_TOKEN }} |