mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-28 12:31:32 -05:00
This change updates Packer core Go version to 1.18. The move to Go 1.18 and not Go 1.19 is to allow the HCP Packer SDK time to upgrade to Go 1.18. Changes Made: * Bump go mod file to use Go 1.18 * Bump release pipeline to use Go 1.18 * Update plugin updater script to run go mod tidy for Go 1.18 * Update Linux job to use setup-go action
43 lines
1 KiB
YAML
43 lines
1 KiB
YAML
#
|
|
# This GitHub action runs Packer go tests across
|
|
# Windows, Linux, and MacOS runners.
|
|
#
|
|
|
|
name: "Go Test"
|
|
|
|
on: [ workflow_dispatch, push ]
|
|
|
|
env:
|
|
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
linux-go-tests:
|
|
runs-on: ubuntu-latest
|
|
name: Linux go tests
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.18'
|
|
- run: TESTARGS="-coverprofile=coverage.txt -covermode=atomic" make ci
|
|
darwin-go-tests:
|
|
runs-on: macos-latest
|
|
name: Darwin go tests
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.18'
|
|
- run: go test ./... -coverprofile=coverage.txt -covermode=atomic
|
|
windows-go-tests:
|
|
runs-on: windows-latest
|
|
name: Windows go tests
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.18'
|
|
- run: go test ./... -coverprofile=coverage.txt -covermode=atomic
|