Skip to content

feat: ProtoValueScanner and ToPtrAny, FromPtrAny, updated docs #42

feat: ProtoValueScanner and ToPtrAny, FromPtrAny, updated docs

feat: ProtoValueScanner and ToPtrAny, FromPtrAny, updated docs #42

Workflow file for this run

name: Testing
on:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- "**/*.md"
jobs:
buildtest:
name: Build Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: "^1.23"
cache: true
# Get values for cache paths to be used in later steps
- name: Setup Go Cache PATH
id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
# Cache go build cache, used to speedup go test
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
# Cache go mod cache, used to speedup builds
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Test Build
run: go build ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: "^1.23"
cache: true
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
with:
# Optional: golangci-lint command line arguments.
args: "--timeout=10m"
unittest:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "^1.23"
cache: true
# Get values for cache paths to be used in later steps
- name: Setup Go Cache PATH
id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
# Cache go build cache, used to speedup go test
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
# Cache go mod cache, used to speedup builds
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Unit tests
run: |
go test ./... -coverprofile=coverage.out -covermode=atomic
go tool cover -func coverage.out