Skip to content

Update README.md

Update README.md #49

Workflow file for this run

name: Go
on:
push:
env:
GOPRIVATE: "github.com/utilitywarehouse/*"
GOLANGCI_LINT_VERSION: "v1.52.2"
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- name: Install binaries
run: make install
- name: Format
run: make format
- name: Check for changes
run: git add . && git diff --staged --exit-code
lint:
runs-on: ubuntu-latest
steps:
- name: Configure git for private modules
run: git config --global url."https://${{ secrets.DEPLOY_GITHUB_USER }}:${{ secrets.DEPLOY_GITHUB_TOKEN }}@github.com".insteadOf "https://github.com"
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
mod:
runs-on: ubuntu-latest
steps:
- name: Configure git for private modules
run: git config --global url."https://${{ secrets.DEPLOY_GITHUB_USER }}:${{ secrets.DEPLOY_GITHUB_TOKEN }}@github.com".insteadOf "https://github.com"
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- name: Tidy modules
run: go mod tidy
- name: Check for changes
run: git add . && git diff --staged --exit-code
test:
runs-on: ubuntu-latest
steps:
- name: Configure git for private modules
run: git config --global url."https://${{ secrets.DEPLOY_GITHUB_USER }}:${{ secrets.DEPLOY_GITHUB_TOKEN }}@github.com".insteadOf "https://github.com"
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- name: Install test runner
run: go install gotest.tools/gotestsum
- name: Test
run: make test