Skip to content

Bump actions/setup-go from 4.1.0 to 5.0.0 #67

Bump actions/setup-go from 4.1.0 to 5.0.0

Bump actions/setup-go from 4.1.0 to 5.0.0 #67

Workflow file for this run

# 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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
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