Skip to content

Post-Release Smoke

Post-Release Smoke #6

name: Post-Release Smoke
on:
workflow_run:
workflows: ["Update Homebrew Formula"]
types: [completed]
workflow_dispatch:
inputs:
version:
description: "Version to smoke-test (without leading v), e.g. 0.5.10"
required: true
type: string
permissions: {}
concurrency:
group: post-release-smoke-${{ github.event.workflow_run.id || inputs.version }}
cancel-in-progress: true
jobs:
resolve-version:
name: Resolve target version
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
permissions:
actions: read
outputs:
version: ${{ steps.pick.outputs.version }}
steps:
- name: Download release-version artifact (workflow_run)
if: ${{ github.event_name == 'workflow_run' }}
uses: actions/download-artifact@v7
with:
name: release-version
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Pick version from artifact or input
id: pick
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
DISPATCH_VERSION: ${{ inputs.version }}
run: |
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
VERSION="$DISPATCH_VERSION"
else
VERSION=$(cat release-version.txt)
fi
if [ -z "$VERSION" ]; then
echo "::error::Could not resolve version"
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Resolved version: $VERSION"
npm-smoke:
name: npm install (${{ matrix.os }})
needs: resolve-version
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
registry-url: https://registry.npmjs.org
- name: Wait for npm registry propagation
shell: bash
env:
VERSION: ${{ needs.resolve-version.outputs.version }}
run: |
for i in $(seq 1 30); do
if npm view "@fitlab-ai/agent-infra@${VERSION}" version >/dev/null 2>&1; then
echo "Package @fitlab-ai/agent-infra@${VERSION} available on npm"
exit 0
fi
echo "Waiting for npm registry... (attempt $i/30)"
sleep 10
done
echo "::error::Package @fitlab-ai/agent-infra@${VERSION} not found on npm after 5 minutes"
exit 1
- name: Smoke test - agent-infra version
shell: bash
env:
VERSION: ${{ needs.resolve-version.outputs.version }}
run: |
OUTPUT=$(npx -y "@fitlab-ai/agent-infra@${VERSION}" version)
echo "$OUTPUT"
echo "$OUTPUT" | grep -F "${VERSION}"
- name: Smoke test - sandbox --help
shell: bash
env:
VERSION: ${{ needs.resolve-version.outputs.version }}
run: |
npx -y "@fitlab-ai/agent-infra@${VERSION}" sandbox --help
brew-smoke:
name: brew install (macos-latest)
needs: resolve-version
runs-on: macos-latest
timeout-minutes: 20
steps:
- name: Wait for Homebrew tap formula bottle block
shell: bash
env:
VERSION: ${{ needs.resolve-version.outputs.version }}
run: |
FORMULA_URL="https://raw.githubusercontent.com/fitlab-ai/homebrew-tap/main/Formula/agent-infra.rb"
for i in $(seq 1 60); do
BODY=$(curl -fsSL "$FORMULA_URL" 2>/dev/null || true)
if printf '%s' "$BODY" | grep -qF "agent-infra-${VERSION}.tgz" \
&& printf '%s' "$BODY" | grep -q "bottle do"; then
echo "Formula updated to ${VERSION} with bottle block"
exit 0
fi
echo "Waiting for tap formula bottle block... (attempt $i/60)"
sleep 10
done
echo "::error::Tap formula bottle block for ${VERSION} not present after 10 minutes"
exit 1
- name: brew install (must pour from bottle)
shell: bash
run: |
brew install --verbose fitlab-ai/tap/agent-infra 2>&1 | tee install.log
if ! grep -q "Pouring" install.log; then
echo "::error::agent-infra was not poured from a bottle (no 'Pouring' in output)"
exit 1
fi
- name: Smoke test - agent-infra version
shell: bash
env:
VERSION: ${{ needs.resolve-version.outputs.version }}
run: |
OUTPUT=$(agent-infra version)
echo "$OUTPUT"
echo "$OUTPUT" | grep -F "${VERSION}"