Skip to content

Go auto release workflows #130

Go auto release workflows

Go auto release workflows #130

Workflow file for this run

name: Tests
on:
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "README.md"
push:
branches:
- main
- release/v*
paths-ignore:
- '.github/**'
- 'docs/**'
- 'examples/**'
- 'test/**'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
# ensure the code builds...
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: 'Setup Go'
uses: actions/setup-go@v4
with:
go-version-file: go.mod
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: |
go mod download
- name: Build
run: |
make build
# run acceptance tests in a matrix with Terraform core versions
test:
name: Matrix Test
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
terraform:
- "0.12.30"
- "0.13.6"
- "0.14.5"
- "0.15.1"
- "1.0.0"
- "1.1.0"
- "1.2.0"
- "1.3.0"
- "1.4.0"
- "1.5.0"
steps:
- name: 'Setup Go'
uses: actions/setup-go@v4
with:
go-version-file: go.mod
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: |
make deps
- name: TF acceptance tests
timeout-minutes: 10
env:
TF_ACC: "1"
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
run: |
make testacc
release:
needs: test
if: github.event_name == 'push'
uses: cloudposse/.github/.github/workflows/shared-go-auto-release.yml@main
with:
publish: true
secrets: inherit