From 11e6b62805691dd1989a40470ce0cbd2a8c38333 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Wed, 8 Jul 2026 12:27:21 -0400 Subject: [PATCH 1/3] feat: Scoped solution tests --- .github/workflows/terraform.yml | 43 ++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 84d8ffc1..9c9619df 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -57,24 +57,49 @@ jobs: sudo snap install just --classic - name: Unit test the Terraform modules run: just unit + changes: + name: Detect changed products + runs-on: ubuntu-latest + outputs: + cos: ${{ steps.filter.outputs.cos }} + cos_lite: ${{ steps.filter.outputs.cos_lite }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Filter changed paths per product + uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + # Shared paths affect *both* products, so they trigger both suites + shared: &shared + - '.github/workflows/terraform.yml' + - '.github/workflows/_integration.yml' + - 'tests/integration/conftest.py' + - 'tests/integration/helpers.py' + - 'pyproject.toml' + - 'uv.lock' + cos: + - *shared + - 'terraform/cos/**' + - 'tests/integration/cos/**' + cos_lite: + - *shared + - 'terraform/cos-lite/**' + - 'tests/integration/cos_lite/**' test-integration-cos-lite: name: COS Lite Terraform integration - needs: [test-unit] + needs: [test-unit, changes] + if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.cos_lite == 'true' }} uses: canonical/observability-stack/.github/workflows/_integration.yml@main with: product: cos_lite runner: self-hosted-linux-amd64-noble-large test-integration-cos: name: COS Terraform integration - needs: [test-unit] + needs: [test-unit, changes] + if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.cos == 'true' }} uses: canonical/observability-stack/.github/workflows/_integration.yml@main with: product: cos runner: self-hosted-linux-amd64-noble-xlarge - test-integration-cos-dev: - name: COS Dev Terraform integration - needs: [test-unit] - uses: canonical/observability-stack/.github/workflows/_integration.yml@main - with: - product: cos_dev - runner: self-hosted-linux-amd64-noble-large From 06e8fb6223c8a1d7f5d6119a25b81e7cbca2a056 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Wed, 8 Jul 2026 12:32:46 -0400 Subject: [PATCH 2/3] chore --- .github/workflows/terraform.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 9c9619df..62abe602 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -63,6 +63,7 @@ jobs: outputs: cos: ${{ steps.filter.outputs.cos }} cos_lite: ${{ steps.filter.outputs.cos_lite }} + cos_dev: ${{ steps.filter.outputs.cos_dev }} steps: - name: Checkout uses: actions/checkout@v4 @@ -87,6 +88,10 @@ jobs: - *shared - 'terraform/cos-lite/**' - 'tests/integration/cos_lite/**' + cos_dev: + - *shared + - 'terraform/cos-dev/**' + - 'tests/integration/cos_dev/**' test-integration-cos-lite: name: COS Lite Terraform integration needs: [test-unit, changes] @@ -103,3 +108,11 @@ jobs: with: product: cos runner: self-hosted-linux-amd64-noble-xlarge + test-integration-cos-dev: + name: COS Dev Terraform integration + needs: [test-unit, changes] + if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.cos_dev == 'true' }} + uses: canonical/observability-stack/.github/workflows/_integration.yml@main + with: + product: cos_dev + runner: self-hosted-linux-amd64-noble-large \ No newline at end of file From 521b7d05a5636c6f4adbaa9793e393c66aa0f34d Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Wed, 8 Jul 2026 12:56:12 -0400 Subject: [PATCH 3/3] chore --- .github/workflows/terraform.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 62abe602..95c8cd15 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -78,8 +78,6 @@ jobs: - '.github/workflows/_integration.yml' - 'tests/integration/conftest.py' - 'tests/integration/helpers.py' - - 'pyproject.toml' - - 'uv.lock' cos: - *shared - 'terraform/cos/**'