Managed by Terraform: Update go-version config #230
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 | |
# | |
# This GitHub action runs Packer go tests across | |
# Windows runners. | |
# | |
name: "Go Test Windows" | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
get-go-version: | |
runs-on: ubuntu-latest | |
outputs: | |
go-version: ${{ steps.get-go-version.outputs.go-version }} | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: 'Determine Go version' | |
id: get-go-version | |
run: | | |
echo "Found Go $(cat .go-version)" | |
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT | |
windows-go-tests: | |
needs: | |
- get-go-version | |
runs-on: windows-latest | |
name: Windows Go tests | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: ${{ needs.get-go-version.outputs.go-version }} | |
- run: | | |
echo "Testing with Go ${{ needs.get-go-version.outputs.go-version }}" | |
go test -race -count 1 ./... -timeout=3m | |