chore(automation): simplify repository delivery boundaries #273
Workflow file for this run
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: Client checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: read | |
| concurrency: | |
| group: >- | |
| client-checks-${{ | |
| github.event.pull_request.number || | |
| github.ref | |
| }} | |
| cancel-in-progress: true | |
| jobs: | |
| workflow-lint: | |
| name: GitHub Actions syntax | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Go for actionlint | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: '1.25.0' | |
| cache: false | |
| - name: Validate GitHub Actions definitions | |
| run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 .github/workflows/*.yml | |
| core-release: | |
| name: Resolve stable core release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| contract_revision: ${{ steps.release.outputs.contract_revision }} | |
| image: ${{ steps.release.outputs.image }} | |
| schema_digest: ${{ steps.release.outputs.schema_digest }} | |
| source_revision: ${{ steps.release.outputs.source_revision }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Node | |
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 | |
| with: | |
| node-version-file: package.json | |
| - name: Authenticate to GHCR | |
| uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Resolve stable once to an immutable release | |
| id: release | |
| run: node scripts/resolve-core-release.mjs | |
| - name: Record upstream release selection | |
| env: | |
| CONTRACT_REVISION: ${{ steps.release.outputs.contract_revision }} | |
| CORE_IMAGE: ${{ steps.release.outputs.image }} | |
| SCHEMA_DIGEST: ${{ steps.release.outputs.schema_digest }} | |
| SOURCE_REVISION: ${{ steps.release.outputs.source_revision }} | |
| run: | | |
| { | |
| echo '## Selected core service release' | |
| echo | |
| echo "- Image: \`$CORE_IMAGE\`" | |
| echo "- Source: \`$SOURCE_REVISION\`" | |
| echo "- Schema: \`$SCHEMA_DIGEST\`" | |
| echo "- Runtime contract: \`$CONTRACT_REVISION\`" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| workspace: | |
| name: Workspace contract | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install the pinned pnpm release | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: 11.11.0 | |
| - name: Set up Node | |
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| registry-url: https://npm.pkg.github.com | |
| scope: '@inkcre' | |
| - name: Install the frozen workspace | |
| run: pnpm install --frozen-lockfile | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Verify static, typed, and package contracts | |
| run: pnpm check | |
| - name: Validate the native Twitter Module Federation snapshot | |
| run: >- | |
| node scripts/verify-native-extension-distribution.mjs inspect-local | |
| --package extensions/twitter/package.json | |
| --core-package packages/core/package.json | |
| --artifact-directory extensions/twitter/dist/client-web | |
| peer-database: | |
| name: client-web E2E | |
| needs: core-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install the pinned pnpm release | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: 11.11.0 | |
| - name: Set up Node | |
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| registry-url: https://npm.pkg.github.com | |
| scope: '@inkcre' | |
| - name: Install the frozen workspace | |
| run: pnpm install --frozen-lockfile | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install the exact browser engine | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Authenticate to GHCR | |
| uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run the selected real core service and isolated browser/database chain | |
| run: pnpm test:e2e:web | |
| env: | |
| INKCRE_CORE_IMAGE: ${{ needs.core-release.outputs.image }} | |
| - name: Upload browser and database evidence on failure | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: peer-database-failure-evidence | |
| path: | | |
| test-results/playwright | |
| test-results/database | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| browser-extension: | |
| name: client-webext E2E | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install the pinned pnpm release | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: 11.11.0 | |
| - name: Set up Node | |
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| registry-url: https://npm.pkg.github.com | |
| scope: '@inkcre' | |
| - name: Install the frozen workspace | |
| run: pnpm install --frozen-lockfile | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install the exact browser engine | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Load the exact Chromium extension build | |
| run: pnpm test:e2e:webext | |
| - name: Build the Firefox extension | |
| run: pnpm --filter @inkcre/client-webext build:firefox | |
| - name: Upload browser evidence on failure | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: browser-extension-failure-evidence | |
| path: test-results/playwright | |
| if-no-files-found: ignore | |
| retention-days: 7 |