Skip to content

chore(gha): optimise integration & provider-integration CI pipelines - #178

Merged
jsteinich merged 6 commits into
open-constructs:mainfrom
X-Guardian:chore/optimise-integration-pipelines
May 18, 2026
Merged

jsteinich merged 6 commits into
open-constructs:mainfrom
X-Guardian:chore/optimise-integration-pipelines

Conversation

@X-Guardian

@X-Guardian X-Guardian commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follow-on to chore(gha): optimise examples CI pipeline (fabb452). Applies the same patterns to integration.yml and provider-integration.yml, plus a couple of waste-reduction wins specific to those workflows.

Integration tests (integration.yml)

  • Matrix shaped per-target instead of cartesian. tools/build-test-matrix.mjs now inspects each test file and emits hclOutput: true only when the file contains an HCL-positive decorator (onlyHcl / onPosixWithHcl / onWindowsWithHcl). Tests that only use onlyJson — or no decorator at all — previously paid a full beforeAll setup cost in HCL mode to skip every assertion. Matrix size drops from 240 → 148 jobs (~38% reduction); 60 unique test targets are preserved, coverage is identical.
  • Removed the tools/align-version.sh step. The matrix consumes dist/ via Verdaccio (run-against-dist); the version string is irrelevant for non-publish runs.
  • Terraform and go cache keys de-scoped: terraform-<os>-<tf>-matrix-integration-<target> → terraform-<os>-<tf>-integration. Stops 60 matrix jobs each writing their own cache entry.
  • made dist artifact name unique.

Provider integration tests (provider-integration.yml)

  • Same align-version removal and cache-key de-scoping.
  • Matrix shaped per-template instead of cartesian. All 12 providers use test/provider-tests/template/test.ts, which today contains only an onlyJson block — so the 12 hclOutput: true jobs did zero useful work. The new tools/build-provider-test-matrix.mjs grep-checks the template for HCL-positive decorators and only emits HCL entries when meaningful. Matrix size drops from 24 → 12 jobs (50% reduction); will auto-double if the template gains an onlyHcl assertion.
  • made dist artifact name unique.

Tooling cleanup

  • tools/build-test-matrix.sh and tools/build-provider-test-matrix.sh ported to ESM (.mjs), matching the style of the existing tools/build-example-matrix.mjs.
  • The disabled windows_integration block in integration.yml (gated if: false) was brought up to the new shape so a future re-enable doesn't regress.
  • Added name: fields to previously unnamed steps across both workflows so the Actions UI surfaces each step clearly.

Impact

Comparison: PR 178 (SHA 4eeb83f, 2026-05-18) vs baseline PR 175 (SHA 6eb6ff0, 2026-05-15)

Integration Tests

Baseline (PR 175) PR 178 Delta
Matrix jobs 243 150 −38%
Aggregate compute (sum of job durations) 14.0h 7.4h −47%
Suite wall-clock (min job-start → max job-end) 3h 23min 1h 35min −53%

Provider Integration Tests

Baseline (PR 175) PR 178 Delta
Matrix jobs 50 25 −50%
Aggregate compute 2.5h 1.3h −47%
Suite wall-clock 1h 10min 36min −49%

Checklist

  • I have updated the PR title to match CDKTN's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

@X-Guardian
X-Guardian marked this pull request as ready for review May 18, 2026 10:58
@X-Guardian
X-Guardian requested a review from a team as a code owner May 18, 2026 10:58
@jsteinich
jsteinich merged commit 3dd7112 into open-constructs:main May 18, 2026
268 checks passed
jsteinich added a commit that referenced this pull request May 26, 2026
## 0.23.2

### chore
- chore: Update npm version to support OIDC trusted publishing
[\#205](#205)
- chore: Fix publib running to use npx rather than yarn
[\#203](#203)
- chore(tests): Add test for Node type stripping
[\#198](#198)
- chore(gha): Enable NPM OIDC Publishing
[\#195](#195)
- chore: remove mention of Hashicorp support
[\#193](#193)
- chore: consolidate release workflows for npm OIDC
[\#192](#192)
- chore: tell users to search for cdktn on npm
[\#185](#185)
- chore: replace cdk.tf/modules-and-providers links
[\#184](#184)
- chore: fix references to cdktf in TS examples
[\#183](#183)
- chore: point to correct docs repo
[\#181](#181)
- chore: delete Vercel config for cdk.tf site
[\#180](#180)
- chore(gha): optimise integration & provider-integration CI pipelines
[\#178](#178)
- chore(gha): optimise examples CI pipeline
[\#175](#175)
- chore: migrate jest to @nx/jest plugin with swc-jest
[\#160](#160)
- chore: replace yazl with fflate
[\#148](#148)
- chore(lib): Move cdktn package to src/ and lib/ layout
[\#145](#145)
- chore: Consolidate PR CI into tiered orchestrator workflow
[\#143](#143)

### fix

- fix(gha): Need to grant permission on workflow call job
[\#196](#196)
- fix(cli): Fix input getting split between cdktn and Terraform
[\#191](#191)
- fix(cli): restore non-bundled dependencies
[\#190](#190)
- fix: Configurable dist artifact name to fix release workflows
[\#189](#189)
- fix(tests): pass --no-compile to pip in python integration tests
[\#188](#188)
- fix(cli): pass languageOptions to `get`
[\#179](#179)
- fix(provider-generator): add missing semicolons
[\#177](#177)

### feat

- feat(provider-generator): configurable import extensions
[\#151](#151)
@github-actions

Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants