Skip to content

chore(pulumi-2.22.3): final minor cleanup from code review #69

chore(pulumi-2.22.3): final minor cleanup from code review

chore(pulumi-2.22.3): final minor cleanup from code review #69

Workflow file for this run

---
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call: # Allow release.yml to call this as a gate
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
# terraform-plugin-testing's resource.UnitTest auto-downloads Terraform
# from releases.hashicorp.com and verifies the signature. As of 2026-04
# HashiCorp's release signing key expired, breaking the auto-install.
# Pre-install Terraform via the official action instead.
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- name: Run unit tests with coverage
run: go test -coverpkg=github.com/numberly/opentofu-provider-flashblade/internal/... -coverprofile=coverage.out ./internal/... -count=1 -timeout 5m
- name: Extract coverage percentage
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
id: coverage
run: |
PCT=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | tr -d '%')
echo "percentage=${PCT}" >> "$GITHUB_OUTPUT"
- name: Update coverage badge
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_TOKEN }}
gistID: 59bd98f69a5ecbb7e643402fde956fed
filename: coverage.json
label: coverage
message: ${{ steps.coverage.outputs.percentage }}%
valColorRange: ${{ steps.coverage.outputs.percentage }}
minColorRange: 40
maxColorRange: 80
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v7
docs-check:
name: Docs up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- name: Regenerate docs
run: go generate ./...
- name: Check for uncommitted doc changes
run: git diff --exit-code docs/