99 default : false
1010 type : boolean
1111 only :
12- description : Optional scenario filter
12+ description : Optional scenario filter (smoke or full)
1313 required : false
14+ default : " "
1415 type : string
1516 workflow_call :
1617 inputs :
@@ -66,13 +67,13 @@ permissions:
6667 contents : read
6768
6869jobs :
69- full :
70+ smoke :
71+ name : smoke
7072 runs-on : ubuntu-24.04
71- timeout-minutes : 480
73+ timeout-minutes : 240
74+ if : ${{ inputs.only == '' || inputs.only == 'smoke' }}
7275 concurrency :
73- # Shared with integration-smoke. Release preflight takes priority over an
74- # already-running smoke run for the same release candidate.
75- group : terrarium-integration
76+ group : terrarium-integration-${{ github.workflow }}-${{ github.ref }}-smoke
7677 cancel-in-progress : ${{ inputs.release_preflight == true }}
7778 env :
7879 HCLOUD_TOKEN : ${{ secrets.HCLOUD_TOKEN }}
@@ -92,10 +93,10 @@ jobs:
9293 CIFS_USERNAME : ${{ secrets.CIFS_USERNAME }}
9394 CIFS_PASSWORD : ${{ secrets.CIFS_PASSWORD }}
9495 CIFS_HOST_PATH_BASE : ${{ secrets.CIFS_HOST_PATH_BASE }}
95- TERRARIUM_INTEGRATION_OUTPUT_DIR : ${{ github.workspace }}/tests/integration/output
96+ TERRARIUM_INTEGRATION_SLUG : gha-${{ github.run_id }}-${{ github.run_attempt }}-smoke
97+ TERRARIUM_INTEGRATION_OUTPUT_DIR : ${{ github.workspace }}/tests/integration/output/smoke
9698 KEEP_ON_FAILURE : ${{ inputs.keep_on_failure && 'true' || 'false' }}
9799 RELEASE_PREFLIGHT : ${{ inputs.release_preflight && 'true' || 'false' }}
98- ONLY_SCENARIO : ${{ inputs.only }}
99100 steps :
100101 - uses : actions/checkout@v4
101102 - uses : oven-sh/setup-bun@v2
@@ -105,12 +106,73 @@ jobs:
105106 sudo apt-get install -y openssh-client tar
106107 bun install --frozen-lockfile
107108 bunx playwright install --with-deps chromium
108- - name : Run full suite
109+ - name : Generate integration SSH key
110+ run : |
111+ ssh-keygen -t ed25519 -N "" -C "terrarium-${TERRARIUM_INTEGRATION_SLUG}" -f "${RUNNER_TEMP}/terrarium-integration-id_ed25519"
112+ chmod 600 "${RUNNER_TEMP}/terrarium-integration-id_ed25519"
113+ {
114+ echo "HCLOUD_SSH_PRIVATE_KEY_FILE=${RUNNER_TEMP}/terrarium-integration-id_ed25519"
115+ echo "HCLOUD_SSH_PUBLIC_KEY_FILE=${RUNNER_TEMP}/terrarium-integration-id_ed25519.pub"
116+ } >> "${GITHUB_ENV}"
117+ - name : Run smoke suite
118+ run : |
119+ if [ "${RELEASE_PREFLIGHT}" = "true" ]; then
120+ bun run tests/integration/index.ts --suite smoke --release-preflight
121+ else
122+ bun run tests/integration/index.ts --suite smoke
123+ fi
124+
125+ post_smoke :
126+ name : post-smoke
127+ runs-on : ubuntu-24.04
128+ timeout-minutes : 360
129+ if : ${{ inputs.only == '' || inputs.only == 'full' }}
130+ concurrency :
131+ group : terrarium-integration-${{ github.workflow }}-${{ github.ref }}-post-smoke
132+ cancel-in-progress : ${{ inputs.release_preflight == true }}
133+ env :
134+ HCLOUD_TOKEN : ${{ secrets.HCLOUD_TOKEN }}
135+ HCLOUD_LOCATION : ${{ secrets.HCLOUD_LOCATION }}
136+ HCLOUD_SERVER_TYPE : ${{ secrets.HCLOUD_SERVER_TYPE }}
137+ HCLOUD_SSH_PRIVATE_KEY : ${{ secrets.HCLOUD_SSH_PRIVATE_KEY }}
138+ HCLOUD_SSH_PUBLIC_KEY : ${{ secrets.HCLOUD_SSH_PUBLIC_KEY }}
139+ ZITADEL_CLOUD_ISSUER : ${{ secrets.ZITADEL_CLOUD_ISSUER }}
140+ ZITADEL_CLOUD_PAT : ${{ secrets.ZITADEL_CLOUD_PAT }}
141+ ZITADEL_CLOUD_ORG_ID : ${{ secrets.ZITADEL_CLOUD_ORG_ID }}
142+ S3_ENDPOINT : ${{ secrets.S3_ENDPOINT }}
143+ S3_BUCKET : ${{ secrets.S3_BUCKET }}
144+ S3_REGION : ${{ secrets.S3_REGION }}
145+ S3_ACCESS_KEY : ${{ secrets.S3_ACCESS_KEY }}
146+ S3_SECRET_KEY : ${{ secrets.S3_SECRET_KEY }}
147+ CIFS_ADDRESS : ${{ secrets.CIFS_ADDRESS }}
148+ CIFS_USERNAME : ${{ secrets.CIFS_USERNAME }}
149+ CIFS_PASSWORD : ${{ secrets.CIFS_PASSWORD }}
150+ CIFS_HOST_PATH_BASE : ${{ secrets.CIFS_HOST_PATH_BASE }}
151+ TERRARIUM_INTEGRATION_SLUG : gha-${{ github.run_id }}-${{ github.run_attempt }}-post-smoke
152+ TERRARIUM_INTEGRATION_OUTPUT_DIR : ${{ github.workspace }}/tests/integration/output/post-smoke
153+ KEEP_ON_FAILURE : ${{ inputs.keep_on_failure && 'true' || 'false' }}
154+ RELEASE_PREFLIGHT : ${{ inputs.release_preflight && 'true' || 'false' }}
155+ steps :
156+ - uses : actions/checkout@v4
157+ - uses : oven-sh/setup-bun@v2
158+ - name : Install integration dependencies
159+ run : |
160+ sudo apt-get update
161+ sudo apt-get install -y openssh-client tar
162+ bun install --frozen-lockfile
163+ bunx playwright install --with-deps chromium
164+ - name : Generate integration SSH key
165+ run : |
166+ ssh-keygen -t ed25519 -N "" -C "terrarium-${TERRARIUM_INTEGRATION_SLUG}" -f "${RUNNER_TEMP}/terrarium-integration-id_ed25519"
167+ chmod 600 "${RUNNER_TEMP}/terrarium-integration-id_ed25519"
168+ {
169+ echo "HCLOUD_SSH_PRIVATE_KEY_FILE=${RUNNER_TEMP}/terrarium-integration-id_ed25519"
170+ echo "HCLOUD_SSH_PUBLIC_KEY_FILE=${RUNNER_TEMP}/terrarium-integration-id_ed25519.pub"
171+ } >> "${GITHUB_ENV}"
172+ - name : Run post-smoke suite
109173 run : |
110- if [ -n "${ONLY_SCENARIO}" ]; then
111- bun run tests/integration/index.ts --suite full --release-preflight --only "${ONLY_SCENARIO}"
112- elif [ "${RELEASE_PREFLIGHT}" = "true" ]; then
113- bun run tests/integration/index.ts --suite full --release-preflight
174+ if [ "${RELEASE_PREFLIGHT}" = "true" ]; then
175+ bun run tests/integration/index.ts --suite full --release-preflight --only full
114176 else
115- bun run tests/integration/index.ts --suite full
177+ bun run tests/integration/index.ts --suite full --only full
116178 fi
0 commit comments