name: Test on: push: branches: ["main"] pull_request: types: [opened, reopened, synchronize] permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: TURBO_API: ${{ secrets.TURBO_API }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAMID: ${{ vars.TURBO_TEAMID }} defaults: run: shell: bash jobs: Vitest: runs-on: ubuntu-26.04 timeout-minutes: 9 env: ATOM_IO_TEST_POSTGRES_SKIP_MISE: "true" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: ./.github/actions/setup with: packages: bun node pnpm - uses: ./.github/actions/setup-postgres - run: pnpm run test Build: runs-on: ubuntu-26.04 timeout-minutes: 9 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: ./.github/actions/setup with: packages: bun node pnpm - run: pnpm run build - run: pnpm test:packaging BrowserSuites: name: Browser Tests (${{ matrix.name }}) runs-on: ubuntu-26.04 timeout-minutes: 9 strategy: fail-fast: false matrix: include: - suite: editor name: Editor filters: --filter=@atom.io/template-react-realtime-text-editor - suite: spa name: SPA filters: --filter=@atom.io/spa --filter=resumability - suite: devtools name: SPA Devtools filters: --filter=@atom.io/spa-devtools - suite: astro name: Astro Starter filters: --filter=@atom.io/template-spa-astro-ssr steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: ./.github/actions/setup with: packages: bun node pnpm - name: Restore Playwright browsers if: matrix.suite != 'devtools' uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ~/.cache/ms-playwright key: playwright-${{ runner.os }}-${{ runner.arch }}-ubuntu-26.04-headless-${{ hashFiles('pnpm-lock.yaml') }} - run: pnpm test:browser:install ${{ matrix.filters }} if: matrix.suite != 'devtools' # Runner Chrome has an AppArmor-approved path for sandboxed devtools tests. - run: pnpm test:browser ${{ matrix.filters }} env: PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH: ${{ matrix.suite == 'devtools' && '/opt/google/chrome/chrome' || '' }} SPA_DEVTOOLS_CANDIDATE_SHA: ${{ github.sha }} SPA_DEVTOOLS_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} - name: Upload devtools window capture if: always() && matrix.suite == 'devtools' uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: spa-devtools-window path: | /tmp/spa-devtools-window /tmp/spa-devtools-ecology /tmp/spa-devtools-polish /tmp/spa-devtools-search /tmp/spa-devtools-search-cpu6 retention-days: 7 - name: Upload motion capture if: always() && matrix.suite == 'spa' uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: spa-motion-capture path: | /tmp/spa-motion-*.png /tmp/spa-motion-*.json retention-days: 7 Storybook: name: Storybook Tests runs-on: ubuntu-26.04 timeout-minutes: 9 env: PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH: /opt/google/chrome/chrome SPA_DEVTOOLS_CANDIDATE_SHA: ${{ github.sha }} SPA_DEVTOOLS_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: ./.github/actions/setup with: packages: bun node pnpm - run: pnpm test:storybook - name: Upload Storybook evidence if: always() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: storybook-tests include-hidden-files: true path: | .scratch/storybook-tests packages/atom.io/.vitest/attachments packages/atom.io/.turbo/turbo-storybook*.log retention-days: 7 BrowserTests: name: Browser Tests needs: [BrowserSuites, Storybook] if: always() runs-on: ubuntu-26.04 timeout-minutes: 1 steps: - name: Require all browser suites to pass env: RESULT: ${{ needs.BrowserSuites.result }} STORYBOOK_RESULT: ${{ needs.Storybook.result }} run: test "$RESULT" = success && test "$STORYBOOK_RESULT" = success Manifest: runs-on: ubuntu-26.04 timeout-minutes: 9 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: ./.github/actions/setup with: packages: bun node pnpm - run: pnpm run manifest:test