Result of tsccr-helper -log-level=info gha update -latest . #96
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
# Copyright (c) HashiCorp, Inc. | |
# SPDX-License-Identifier: MPL-2.0 | |
name: Per-commit Checks | |
on: | |
push: | |
workflow_dispatch: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
unit_tests: | |
name: "unit tests" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Fetch source code" | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Install Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: 1.18 | |
- name: Go test | |
run: | | |
go test ./... | |
fmt_and_vet: | |
name: "fmt and lint" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Fetch source code" | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Install Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: 1.18 | |
- name: "Check vet" | |
run: | | |
go vet ./... | |
- name: "Check fmt" | |
run: | | |
go fmt ./... | |
if [[ -z "$(git status --porcelain)" ]]; then | |
echo "Formatting is consistent with 'go fmt'." | |
else | |
echo "Run 'go fmt ./...' to automatically apply standard Go style to all packages." | |
git status --porcelain | |
exit 1 | |
fi |