Install reviewed w3-lab-auto workflows on main #382
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: {} | |
| workflow_dispatch: {} | |
| jobs: | |
| lint-and-test-js: | |
| name: Lint, typecheck, and test (CLI + Node SDK) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Setup Node.js 22 | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "22" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| # Do not pin `version:` here — it conflicts with package.json packageManager | |
| # (pnpm/action-setup v4 fails the job before tests or publish can run). | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install strace | |
| run: sudo apt-get update && sudo apt-get install -y strace | |
| - name: Lint @vantio/cli | |
| run: pnpm --filter @vantio/cli run lint | |
| - name: Typecheck @vantio/agent-sdk (src) | |
| run: pnpm --filter @vantio/agent-sdk run typecheck | |
| - name: Typecheck @vantio/agent-sdk (tests) | |
| run: pnpm --filter @vantio/agent-sdk run typecheck:test | |
| - name: Test @vantio/cli | |
| run: pnpm --filter @vantio/cli run test | |
| - name: Test @vantio/agent-sdk | |
| run: pnpm --filter @vantio/agent-sdk run test | |
| - name: Build @vantio/agent-sdk (verify dist output is producible) | |
| run: pnpm --filter @vantio/agent-sdk run build | |
| test-python: | |
| name: Test Python SDK (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install optional HTTP clients the observe tests exercise | |
| run: python -m pip install --disable-pip-version-check requests httpx aiohttp urllib3 | |
| - name: Run tests (stdlib unittest — the SDK itself has no install dependencies) | |
| working-directory: packages/vantio-agent-sdk-py | |
| run: python -m unittest discover -s tests -t . -v | |
| release-governance: | |
| name: Release governance contract | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Setup Node.js 22 | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "22" | |
| - name: Setup Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Test release gates | |
| run: | | |
| python3 -m pip install --disable-pip-version-check 'pyyaml==6.0.1' | |
| node --test scripts/release/governance.test.mjs | |
| node --test scripts/release/ws11/ws11.test.mjs | |
| python3 scripts/release/test_promote_pypi.py -v | |
| python3 scripts/release/test_pypi_publish_workflow.py -v | |
| python3 scripts/aws/test_verify_w3_lab_teardown.py -v | |
| python3 scripts/aws/test_preflight_w3_lab_teardown.py -v | |
| python3 scripts/aws/test_w3_lab_teardown_workflow.py -v | |
| candidate-artifacts: | |
| name: Build release candidates (no registry write) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Setup Node.js 22 | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "22" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Pack @vantio/cli candidate | |
| working-directory: packages/vantio-cli | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/candidates" | |
| npm pack --ignore-scripts --pack-destination "$RUNNER_TEMP/candidates" | |
| - name: Setup Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Build Python sdist and wheel candidate | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/candidates-py" | |
| python3 -m pip install --disable-pip-version-check build | |
| python3 -m build --outdir "$RUNNER_TEMP/candidates-py" packages/vantio-agent-sdk-py | |
| - name: Upload candidates | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: release-candidates | |
| path: | | |
| ${{ runner.temp }}/candidates | |
| ${{ runner.temp }}/candidates-py | |
| if-no-files-found: error | |
| test-vantio-install: | |
| name: Test vantio-install (Stage A fixtures) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Compile and test vantio-install | |
| working-directory: packages/vantio-install | |
| run: | | |
| python -m compileall -q vantio_install | |
| python -m unittest discover -s tests -t . -v |