fix(web): clear blank space after active turns #885
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: | |
| inputs: | |
| deploy: | |
| description: "Deploy app.threadlines.dev after checks pass. Only applies when dispatched from main." | |
| required: false | |
| default: false | |
| type: boolean | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Format, Lint, Typecheck, Test, Browser Test, Build | |
| runs-on: ubuntu-latest | |
| # 20 minutes starves dependency-bump branches: a lockfile change cold-starts | |
| # every cache and slow runners then hit the cap mid-pipeline. | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@313600b80b104eadebb9111787d37a2e83e014ca # v1.17.0 | |
| with: | |
| node-version-file: package.json | |
| cache: true | |
| version: "0.2.4" | |
| run-install: false | |
| - name: Install dependencies | |
| run: vp install --frozen-lockfile | |
| - name: Ensure Electron binary is installed | |
| run: node scripts/ensure-electron-binary.ts | |
| - name: Format | |
| run: vp fmt --check | |
| - name: Lint | |
| run: vp exec vp lint --report-unused-disable-directives | |
| - name: Vendored Playwright injected script is current | |
| run: node scripts/extract-playwright-injected.ts --check | |
| - name: Typecheck | |
| run: vp exec vp run -r --concurrency-limit 2 typecheck | |
| - name: Test | |
| run: vp exec vp run test | |
| # Hosted runners point apt at azure.archive.ubuntu.com, which | |
| # intermittently stalls for 20+ minutes and starves the job timeout. | |
| # Ubuntu 24.04 keeps the active mirror in apt-mirrors.txt, while older | |
| # images use .list or .sources files, so update every supported format. | |
| - name: Use main Ubuntu mirror for apt | |
| run: sudo find /etc/apt -type f \( -name "*.list" -o -name "*.sources" -o -name "apt-mirrors.txt" \) -exec sed -i 's|azure.archive.ubuntu.com|archive.ubuntu.com|g' {} + | |
| - name: Install browser test runtime | |
| timeout-minutes: 10 | |
| run: vp exec vp run --filter @threadlines/web test:browser:install | |
| - name: Browser test | |
| run: vp exec vp run --filter @threadlines/web test:browser | |
| # Browser test failures are timing-sensitive and CI-only more often than | |
| # not; the on-failure screenshot is the only evidence of what rendered. | |
| - name: Upload browser test failure screenshots | |
| if: failure() | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: browser-test-screenshots | |
| path: apps/web/src/**/__screenshots__/** | |
| if-no-files-found: ignore | |
| - name: Build desktop pipeline | |
| run: vp exec vp run build:desktop | |
| - name: Verify preload bundle output | |
| run: | | |
| test -f apps/desktop/dist-electron/preload.cjs | |
| grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs | |
| release_smoke: | |
| name: Release Smoke | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@313600b80b104eadebb9111787d37a2e83e014ca # v1.17.0 | |
| with: | |
| node-version-file: package.json | |
| cache: true | |
| version: "0.2.4" | |
| run-install: false | |
| - name: Install dependencies | |
| run: vp install --frozen-lockfile | |
| - name: Exercise release-only workflow steps | |
| run: node scripts/release-smoke.ts | |
| deploy_web_app: | |
| name: Deploy app.threadlines.dev | |
| needs: | |
| - quality | |
| - release_smoke | |
| if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && inputs.deploy == true | |
| uses: ./.github/workflows/deploy-web.yml | |
| secrets: inherit |