From 4effbe5a2f30324176f3f81cd94c1bf9e82e7a7f Mon Sep 17 00:00:00 2001 From: edersonbrilhante Date: Fri, 18 Sep 2026 23:29:17 +0200 Subject: [PATCH 1/2] ci: reduce number of unnecessary jobs --- .github/dependabot.yml | 2 +- .github/workflows/ministack.yml | 83 +----------------------- .github/workflows/smoke-tests.yml | 101 ++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 81 deletions(-) create mode 100644 .github/workflows/smoke-tests.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b70462a9e1..51321bf4aa 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -94,7 +94,7 @@ updates: update-types: ["version-update:semver-major"] - package-ecosystem: "docker-compose" - directory: "/" + directory: ".github/workflows" schedule: interval: "weekly" allow: diff --git a/.github/workflows/ministack.yml b/.github/workflows/ministack.yml index 80af872e42..7966251cc6 100644 --- a/.github/workflows/ministack.yml +++ b/.github/workflows/ministack.yml @@ -1,27 +1,11 @@ -name: "MiniStack Terraform lifecycle" +name: "Terraform lifecycle" on: push: branches: - main - paths: - - ".github/workflows/ministack.yml" - - "tests/ministack/**" - - "*.tf" - - "policies/**" - - "examples/**" - - "modules/**" - - "lambdas/**" pull_request: - paths: - - ".github/workflows/ministack.yml" - - "tests/ministack/**" - - "*.tf" - - "policies/**" - - "examples/**" - - "modules/**" - - "lambdas/**" - workflow_dispatch: + paths: ["**/*.tf", "**/*.hcl", ".github/workflows/terraform.yml"] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -76,7 +60,7 @@ jobs: - termination-watcher services: ministack: - image: ghcr.io/ministackorg/ministack:1.5.11@sha256:ce3c906f2866ff953ce4c56f06b1fa3e453bc32e41c00de17b5f5a8672c5a42c + image: ghcr.io/ministackorg/ministack:1.5.13@sha256:ce3c906f2866ff953ce4c56f06b1fa3e453bc32e41c00de17b5f5a8672c5a42c ports: - 4566:4566 env: @@ -134,64 +118,3 @@ jobs: IAC_BINARY: ${{ matrix.iac.binary }} IAC_LOCK_FILE: ${{ matrix.iac.lockfile }} run: tests/ministack/run-example.sh destroy "$EXAMPLE" - - integration_smoke: - name: Run webhook and pool lifecycle smoke test against MiniStack - runs-on: ubuntu-latest - timeout-minutes: 30 - services: - ministack: - image: ghcr.io/ministackorg/ministack:1.5.10@sha256:706b2b83c6be7e4f4dbb6a0dc28ffdebb500c6c80b64cf7938f45040fb2158e8 - ports: - - 4566:4566 - options: --add-host=host.docker.internal:host-gateway - env: - MINISTACK_ACCOUNT_ID: "000000000000" - MINISTACK_REGION: eu-west-1 - steps: - - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Setup Node.js - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - with: - node-version-file: lambdas/.nvmrc - package-manager-cache: false - - - name: Setup Terraform - uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1 - with: - terraform_version: latest - terraform_wrapper: false - - - name: Install Lambda dependencies - working-directory: lambdas - run: yarn install --frozen-lockfile - - - name: Build smoke-test Lambda distributions - working-directory: lambdas - run: | - yarn workspace @aws-github-runner/webhook dist - yarn workspace @aws-github-runner/control-plane dist - - - name: Start MockServer - id: mockserver - uses: mock-server/setup-mockserver@24612c2ccef1f83d587f331ed77cc5cef441e0b1 # v1.0.0 - with: - version: '7.6.0@sha256:80b3b1a26f3553d0c81a3f3896b5b7274c17b2a2e52f0fd2b28e246bc9efa290' - port: '1080' - startup-timeout: '60' - - - name: Run webhook and pool lifecycle smoke test - env: - MINISTACK_GITHUB_MOCK_HOST: host.docker.internal - MINISTACK_GITHUB_MOCK_PORT: "1080" - MINISTACK_GITHUB_MOCK_URL: ${{ steps.mockserver.outputs.url }} - run: sh tests/ministack/run-smoke.sh diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml new file mode 100644 index 0000000000..fbb8a7b731 --- /dev/null +++ b/.github/workflows/smoke-tests.yml @@ -0,0 +1,101 @@ +name: "Smoke Tests" + +on: + push: + branches: + - main + paths: + - "tests/ministack/**" + - "*.tf" + - "policies/**" + - "examples/**" + - "modules/**" + - "lambdas/**" + pull_request: + paths: + - "tests/ministack/**" + - "*.tf" + - "policies/**" + - "examples/**" + - "modules/**" + - "lambdas/**" + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +env: + AWS_ACCESS_KEY_ID: "000000000000" + AWS_DEFAULT_REGION: eu-west-1 + AWS_EC2_METADATA_DISABLED: "true" + AWS_ENDPOINT_URL: http://localhost:4566 + AWS_REGION: eu-west-1 + AWS_SECRET_ACCESS_KEY: test-only + TF_IN_AUTOMATION: "true" + TF_INPUT: "false" + +jobs: + control_plane_smoke: + name: Run webhook and pool lifecycle smoke test against MiniStack + runs-on: ubuntu-latest + timeout-minutes: 30 + services: + ministack: + image: ghcr.io/ministackorg/ministack:1.5.13@sha256:ce3c906f2866ff953ce4c56f06b1fa3e453bc32e41c00de17b5f5a8672c5a42c + ports: + - 4566:4566 + options: --add-host=host.docker.internal:host-gateway + env: + MINISTACK_ACCOUNT_ID: "000000000000" + MINISTACK_REGION: eu-west-1 + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version-file: lambdas/.nvmrc + package-manager-cache: false + + - name: Setup Terraform + uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1 + with: + terraform_version: latest + terraform_wrapper: false + + - name: Install Lambda dependencies + working-directory: lambdas + run: yarn install --frozen-lockfile + + - name: Build smoke-test Lambda distributions + working-directory: lambdas + run: | + yarn workspace @aws-github-runner/webhook dist + yarn workspace @aws-github-runner/control-plane dist + + - name: Start MockServer + id: mockserver + uses: mock-server/setup-mockserver@24612c2ccef1f83d587f331ed77cc5cef441e0b1 # v1.0.0 + with: + version: '7.6.0@sha256:80b3b1a26f3553d0c81a3f3896b5b7274c17b2a2e52f0fd2b28e246bc9efa290' + port: '1080' + startup-timeout: '60' + + - name: Run webhook and pool lifecycle smoke test + env: + MINISTACK_GITHUB_MOCK_HOST: host.docker.internal + MINISTACK_GITHUB_MOCK_PORT: "1080" + MINISTACK_GITHUB_MOCK_URL: ${{ steps.mockserver.outputs.url }} + run: sh tests/ministack/run-smoke.sh From fee4a470849459edb82ebe40c8f5eae8911fee73 Mon Sep 17 00:00:00 2001 From: edersonbrilhante Date: Tue, 22 Sep 2026 15:59:08 +0200 Subject: [PATCH 2/2] ci: fix event triggers --- .github/dependabot.yml | 7 ------- .github/workflows/ministack.yml | 5 +---- .github/workflows/smoke-tests.yml | 18 +----------------- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 51321bf4aa..aea4db326e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -93,13 +93,6 @@ updates: - dependency-name: "mcr.microsoft.com/vscode/devcontainers/typescript-node" update-types: ["version-update:semver-major"] - - package-ecosystem: "docker-compose" - directory: ".github/workflows" - schedule: - interval: "weekly" - allow: - - dependency-name: "ghcr.io/ministackorg/ministack" - - package-ecosystem: "pip" directory: "/.github/workflows/mkdocs" schedule: diff --git a/.github/workflows/ministack.yml b/.github/workflows/ministack.yml index 7966251cc6..717fdf5dc3 100644 --- a/.github/workflows/ministack.yml +++ b/.github/workflows/ministack.yml @@ -1,11 +1,8 @@ name: "Terraform lifecycle" on: - push: - branches: - - main pull_request: - paths: ["**/*.tf", "**/*.hcl", ".github/workflows/terraform.yml"] + paths: ["**/*.tf", "**/*.hcl", ".github/workflows/ministack.yml"] concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index fbb8a7b731..5b519480c3 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -1,24 +1,8 @@ name: "Smoke Tests" on: - push: - branches: - - main - paths: - - "tests/ministack/**" - - "*.tf" - - "policies/**" - - "examples/**" - - "modules/**" - - "lambdas/**" pull_request: - paths: - - "tests/ministack/**" - - "*.tf" - - "policies/**" - - "examples/**" - - "modules/**" - - "lambdas/**" + paths: ["**/*.tf", "**/*.hcl", ".github/workflows/smoke-tests.yml"] workflow_dispatch: concurrency: