update: docs #88
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: Project Build | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Go Test and Upload Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.16 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Setup environment configuration | |
run: cp ./configs/config.yaml.example ./configs/config.yaml | |
- name: Run go test | |
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./... | |
- name: Upload coverage | |
if: ${{ success() }} | |
run: bash <(curl -s https://codecov.io/bash) | |
build: | |
name: Go Build | |
strategy: | |
matrix: | |
go: [1.13, 1.16, 1.20] | |
runs-on: ubuntu-latest | |
env: | |
GOOS: linux | |
GOARCH: amd64 | |
CGO_ENABLED: 0 | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^${{ matrix.go }} | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Build | |
run: go build -v . |