Feat: add support for Duration for AWS Assume Roles in env0_aws_crede… #1795
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
env: | |
ENV0_API_ENDPOINT: ${{ secrets.ENV0_API_ENDPOINT }} | |
ENV0_API_KEY: ${{ secrets.TF_PROVIDER_INTEGRATION_TEST_API_KEY }} # API Key for organization 'TF-provider-integration-tests' @ dev | |
ENV0_API_SECRET: ${{ secrets.TF_PROVIDER_INTEGRATION_TEST_API_SECRET }} | |
GO_VERSION: "1.20" | |
TERRAFORM_VERSION: 1.1.7 | |
jobs: | |
unit-tests: | |
name: Unit Tests | |
timeout-minutes: 10 | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Generate mocks | |
run: | | |
go install go.uber.org/mock/[email protected] | |
go generate client/api_client.go | |
- name: Go fmt | |
run: | | |
! go fmt ./... | read | |
- name: Go vet | |
run: | | |
! go vet ./... | read | |
- name: Go staticcheck | |
uses: dominikh/[email protected] | |
with: | |
version: "2023.1.3" | |
install-go: false | |
- name: Go Test | |
run: go test -v ./... | |
# See terraform-provider-env0 README for integration tests prerequisites | |
integration-tests: | |
name: Integration Tests | |
runs-on: ubuntu-20.04 | |
container: golang:1.20-alpine3.18 | |
timeout-minutes: 20 | |
steps: | |
- name: Install Terraform | |
run: apk add terraform | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run Harness tests | |
run: go run tests/harness.go |