Danny 0422b9ecbe
Restore Policy options added (#350)
* Issue #349:
Added policy for restore to code base.  Policy Items are placed in the `internal/common` directory
2022-07-19 21:28:23 +00:00

53 lines
1.2 KiB
YAML

name: Linting of Source Code
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Linting:
environment: Testing
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Checkout src code
uses: actions/checkout@v3
- name: Golang Setup
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Cache Go build
uses: actions/cache@v3
id: mybuild
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum')}}
- name: Cache Go Mod
uses: actions/cache@v3
id: cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod${{ hashFiles('**/go.sum')}}
- name: Download package dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: Build for Lint
if: steps.mybuild.outputs.cache-hit != 'true'
run: go build ./...
- name: Go Lint
uses: golangci/golangci-lint-action@v3.2.0
with:
version: v1.45.2
working-directory: ./src
args: --timeout=15m
skip-pkg-cache: true