From f76adec8a69d5d159933131b93dfd21510b7d936 Mon Sep 17 00:00:00 2001 From: Richie Foreman Date: Fri, 3 Oct 2025 10:43:06 -0400 Subject: [PATCH] feat(ci): Add some very basic smoke testing to CI.yml (#10451) --- .github/workflows/ci.yml | 20 +++++++++++++ .github/workflows/smoke-test.yml | 49 ++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .github/workflows/smoke-test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ffc29eef5..476b20b494 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,6 +125,12 @@ jobs: NO_COLOR: true run: 'npm run test:ci' + - name: 'Bundle' + run: 'npm run bundle' + + - name: 'Smoke test bundle' + run: 'node ./bundle/gemini.js --version' + - name: 'Wait for file system sync' run: 'sleep 2' @@ -187,6 +193,12 @@ jobs: NO_COLOR: true run: 'npm run test:ci -- --coverage.enabled=false' + - name: 'Bundle' + run: 'npm run bundle' + + - name: 'Smoke test bundle' + run: 'node ./bundle/gemini.js --version' + - name: 'Wait for file system sync' run: 'sleep 2' @@ -323,6 +335,14 @@ jobs: run: 'npm run test:ci -- --coverage.enabled=false' shell: 'pwsh' + - name: 'Bundle' + run: 'npm run bundle' + shell: 'pwsh' + + - name: 'Smoke test bundle' + run: 'node ./bundle/gemini.js --version' + shell: 'pwsh' + ci: name: 'CI' if: 'always()' diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml new file mode 100644 index 0000000000..b60eeaee20 --- /dev/null +++ b/.github/workflows/smoke-test.yml @@ -0,0 +1,49 @@ +name: 'On Merge Smoke Test' + +on: + push: + branches: + - 'main' + - 'release/**' + workflow_dispatch: + inputs: + ref: + description: 'The branch, tag, or SHA to test on.' + required: false + type: 'string' + default: 'main' + dry-run: + description: 'Run a dry-run of the smoke test; No bug will be created' + required: true + type: 'boolean' + default: true + +jobs: + smoke-test: + runs-on: 'self-hosted' + permissions: + contents: 'read' + issues: 'write' + steps: + - name: 'Checkout' + uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' + with: + ref: '${{ github.event.inputs.ref || github.sha }}' + fetch-depth: 0 + - name: 'Install Dependencies' + run: 'npm ci' + - name: 'Build bundle' + run: 'npm run bundle' + - name: 'Smoke test bundle' + run: 'node ./bundle/gemini.js --version' + - name: 'Create Issue on Failure' + if: '${{ failure() && github.event.inputs.dry-run == false }}' + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + DETAILS_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + REF: '${{ github.event.inputs.ref }}' + run: | + gh issue create \ + --title 'Smoke test failed on ${REF} @ $(date +'%Y-%m-%d')' \ + --body 'Smoke test build failed. See the full run for details: ${DETAILS_URL}' \ + --label 'kind/bug,priority/p0'