ci: point publish at the reusable workflow's canonical repo (#1035) #3394
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: Test Workflow | |
| on: | |
| push: | |
| branches: [main, next] | |
| paths-ignore: | |
| - 'assets/**' | |
| - 'tool/**' | |
| pull_request: | |
| branches: [main, next] | |
| paths-ignore: | |
| - 'test_resources/**' | |
| - 'assets/**' | |
| - 'tool/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| format: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| # Observed ~1m30s. Every job here sets a bound because the GitHub default | |
| # is 360 minutes, so a wedged step burns runner time for six hours and | |
| # blocks the PR with a check that never resolves. | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: kuhnroyal/flutter-fvm-config-action@v2 | |
| id: fvm-config-action | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
| channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | |
| - name: Setup Melos | |
| run: | | |
| dart pub global activate melos 6.3.3 | |
| melos bootstrap | |
| - name: Check formatting | |
| run: melos run format:check | |
| test: | |
| name: Test / Run tests for all packages | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| # Observed ~6m for the full workspace suite. | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: kuhnroyal/flutter-fvm-config-action@v2 | |
| id: fvm-config-action | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
| channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | |
| - name: Setup Melos | |
| run: | | |
| dart pub global activate melos 6.3.3 | |
| melos bootstrap | |
| # DCM requires CI credentials; this job still runs all Dart analysis. | |
| - name: Verify schema inventories | |
| run: melos run schema:inventory | |
| - name: Analyze | |
| run: melos run analyze:dart | |
| - name: Test | |
| run: melos run ci | |
| showcase-tool: | |
| name: Showcase Tool Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| defaults: | |
| run: | |
| working-directory: packages/mix_winds/tool/visual-comparison | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: packages/mix_winds/tool/visual-comparison/package-lock.json | |
| - name: Install Node dependencies | |
| run: npm ci | |
| # Skips the download entirely on a hit. The browser only changes when the | |
| # pinned Playwright version does, so the lockfile is the right key. | |
| - name: Cache Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: >- | |
| playwright-${{ runner.os }}-${{ | |
| hashFiles('packages/mix_winds/tool/visual-comparison/package-lock.json') | |
| }} | |
| - name: Install Chromium | |
| # Deliberately no --with-deps. That flag shells out to apt-get, and the | |
| # Azure Ubuntu mirror on GitHub's runners intermittently hangs there: | |
| # it stalled this job for 21 minutes on PR #1032 and again to the | |
| # 10-minute bound on PR #1031, while every other step passed. The | |
| # ubuntu-24.04 image already ships Chromium's shared libraries, and | |
| # Playwright is pinned well past 1.45, which is where 24.04 support | |
| # landed. If a future image drops a library, this fails fast with a | |
| # missing-library error naming it -- add just that package rather than | |
| # putting all of apt back on the critical path. | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| timeout-minutes: 10 | |
| run: npx playwright install chromium | |
| - name: Run showcase tool tests | |
| run: npm test |