Skip to content

feat: add support for OpenTofu plan files (#1659) #9108

feat: add support for OpenTofu plan files (#1659)

feat: add support for OpenTofu plan files (#1659) #9108

Workflow file for this run

# Copyright 2023 Terramate GmbH
# SPDX-License-Identifier: MPL-2.0
name: ci
on:
push:
branches:
- main
- v0.4.x
pull_request:
jobs:
checks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Configure asdf and plugins needed
uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267
- name: checking go mod tidyness
run: terramate run --tags golang --changed -- make mod/check
- name: linting code
run: terramate run --tags golang --changed -- make lint
- name: checking license on source code
run: terramate run --tags golang --changed -- make license/check
build_test:
name: Build and Test
runs-on: ${{ matrix.os }}
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
strategy:
matrix:
os: ["ubuntu-20.04", "macos-13"]
go: ["1.21"]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: opentofu/setup-opentofu@v1
with:
tofu_version: 1.6.2
tofu_wrapper: false
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure asdf and plugins needed
uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267
- name: make generate
run: terramate generate
- name: make test
run: terramate run --tags golang --changed -- make test
env:
TM_TEST_TERRAFORM_REQUIRED_VERSION: "1.7.5"
- name: make build
run: terramate run --tags golang --changed -- make build
- name: check cloud info
run: terramate run --tags golang --changed -- ./bin/terramate -vv experimental cloud info
gh_integration_test:
name: GHA Integration Test
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Configure asdf and plugins needed
uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267
- name: make test/ci
run: terramate run --tags golang --changed -- make test/ci
release_dry_run:
name: Release Dry Run
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Configure asdf and plugins needed
uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267
- name: release dry run
run: terramate run --tags golang --changed -- make release/dry-run
ci:
needs:
- checks
- build_test
- gh_integration_test
runs-on: ubuntu-20.04
steps:
- uses: Kesin11/actions-timeline@v1