include created at in request #68
Workflow file for this run
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: 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 |