Skip to content

Bump google.golang.org/grpc in the go_modules group across 1 directory #33

Bump google.golang.org/grpc in the go_modules group across 1 directory

Bump google.golang.org/grpc in the go_modules group across 1 directory #33

Workflow file for this run

# Terraform Provider CI workflow.
name: CI
on:
pull_request:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.golangci.yml'
- '.github/workflows/ci.yml'
- '.goreleaser.yml'
- 'examples/**'
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.golangci.yml'
- '.github/workflows/ci.yml'
- '.goreleaser.yml'
- 'examples/**'
permissions:
contents: read
jobs:
govulncheck:
name: Vulnerability Check
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- id: govulncheck
uses: golang/govulncheck-action@v1
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: 'go.mod'
cache: true
- run: go mod download
- run: go build -v -o terraform-provider-ona .
- name: Run linters
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: latest
test:
name: Unit Tests
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: 'go.mod'
cache: true
- run: go mod download
- run: go test -v -cover ./...
integration:
name: Integration Test (Terraform ${{ matrix.terraform }})
needs:
- build
- govulncheck
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
strategy:
max-parallel: 1
matrix:
terraform:
- '1.7.*'
- '1.14.*'
env:
GITPOD_API_KEY: ${{ secrets.GITPOD_API_KEY }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- name: Build provider
run: go build -o terraform-provider-ona .
- name: Setup dev overrides
run: |
cat > ~/.terraformrc << EOF
provider_installation {
dev_overrides {
"combor/ona" = "${{ github.workspace }}"
}
direct {}
}
EOF
- name: Clean up stale runners
working-directory: examples/cleanup
run: |
terraform apply -auto-approve \
-var="runner_manager_id=${{ secrets.RUNNER_MANAGER_ID }}"
terraform destroy -auto-approve \
-var="runner_manager_id=${{ secrets.RUNNER_MANAGER_ID }}"
- name: Terraform Apply
working-directory: examples
run: |
terraform apply -auto-approve \
-var="runner_name=tf-ci-${{ github.run_id }}" \
-var="runner_provider_type=RUNNER_PROVIDER_MANAGED" \
-var="runner_manager_id=${{ secrets.RUNNER_MANAGER_ID }}" \
-var="runner_region=eu-central-1" \
-var="project_name=tf-ci-proj-${{ github.run_id }}"
- name: Terraform Destroy
if: always()
working-directory: examples
run: |
terraform destroy -auto-approve \
-var="runner_name=tf-ci-${{ github.run_id }}" \
-var="runner_provider_type=RUNNER_PROVIDER_MANAGED" \
-var="runner_manager_id=${{ secrets.RUNNER_MANAGER_ID }}" \
-var="runner_region=eu-central-1" \
-var="project_name=tf-ci-proj-${{ github.run_id }}"
release:
name: Release
needs:
- test
- integration
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: 'go.mod'
cache: true
# - name: Import GPG key
# uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
# id: import_gpg
# with:
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
# passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}