Skip to content

Merge pull request #3 from companyinfo/support-sql-scanner-valuer #9

Merge pull request #3 from companyinfo/support-sql-scanner-valuer

Merge pull request #3 from companyinfo/support-sql-scanner-valuer #9

Workflow file for this run

name: GoURN CI
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches:
- '*'
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20.x
uses: actions/setup-go@v4
with:
go-version: 1.20.x
cache-dependency-path: go.sum
- name: Checkout Code
uses: actions/checkout@v3
- name: go-fmt
run: |
if [ -n "$(gofmt -s -l .)" ]; then
echo "Go code is not formatted, run 'gofmt -s -w .'"
exit 1
fi
- name: go-vet
run: go vet ./...
- name: revive
run: |
go install github.com/mgechev/[email protected]
revive -config .revive.toml -formatter friendly ./...
test:
name: Test
needs: check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Go 1.20.x
uses: actions/setup-go@v4
with:
go-version: 1.20.x
cache-dependency-path: go.sum
- name: Test GoURN
run: go test -v -covermode=count -coverprofile=coverage.out ./...