refactor(stage-pages): share polaroid page #10627
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # NOTICE: | |
| # Pin Node.js because 26.8.0 reports 26.8.0-alpha.0.0.0. | |
| # sharp 0.29.3 rejects this prerelease version during pnpm install. | |
| # Source: https://github.com/nodejs/node/blob/v26.8.0/src/node_version.h | |
| # Remove this pin when Node.js 26 reports a stable version. | |
| - uses: pnpm/setup@v2 | |
| with: | |
| runtime: node@26.7.0 | |
| cache: true | |
| install: false | |
| # Setup .NET for Godot C# linting | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| # Lint Godot C# code | |
| - name: Lint Godot C# | |
| working-directory: ./engines/stage-tamagotchi-godot | |
| run: dotnet format stage-tamagotchi-godot.slnx --verify-no-changes | |
| - run: docker run -v `pwd`:`pwd` -w `pwd` ghcr.io/realm/swiftlint:latest | |
| working-directory: ./apps/stage-pocket | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run lint | |
| - run: docker run -v `pwd`:`pwd` -w `pwd` ghcr.io/realm/swiftlint:latest | |
| working-directory: ./apps/stage-pocket | |
| build-test: | |
| name: Build Test (${{ matrix.app_name }}) | |
| if: ${{ !(github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.label, 'moeru-ai:i18n/')) }} | |
| strategy: | |
| matrix: | |
| include: | |
| - app_name: stage-web | |
| command: pnpm -F @proj-airi/stage-web run build && pnpm -F @proj-airi/docs run build:base && mv ./docs/.vitepress/dist ./apps/stage-web/dist/docs && pnpm -F @proj-airi/stage-ui run story:build && mv ./packages/stage-ui/.histoire/dist ./apps/stage-web/dist/ui | |
| - app_name: stage-tamagotchi | |
| command: pnpm -F @proj-airi/stage-tamagotchi run build | |
| - app_name: stage-tamagotchi-godot | |
| command: cd engines/stage-tamagotchi-godot && dotnet restore && dotnet build -c ExportRelease | |
| - app_name: ui-transitions | |
| command: pnpm -F @proj-airi/ui-transitions run play:build | |
| - app_name: ui-loading-screens | |
| command: pnpm -F @proj-airi/ui-loading-screens run play:build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Turborepo | |
| - name: Cache turbo build setup | |
| uses: actions/cache@v5 | |
| with: | |
| path: .turbo | |
| key: ${{ runner.os }}-turbo-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-turbo- | |
| - uses: pnpm/setup@v2 | |
| with: | |
| runtime: node@26.7.0 | |
| cache: true | |
| install: false | |
| # Setup .NET and Godot | |
| - name: Setup .NET | |
| if: matrix.app_name == 'stage-tamagotchi-godot' | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Setup Godot | |
| if: matrix.app_name == 'stage-tamagotchi-godot' | |
| uses: chickensoft-games/setup-godot@v2 | |
| with: | |
| version: 4.7.1 | |
| use-dotnet: true | |
| include-templates: true | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run build:packages | |
| - name: Build App | |
| run: ${{ matrix.command }} | |
| - name: Export Godot Linux sidecar | |
| if: matrix.app_name == 'stage-tamagotchi-godot' | |
| working-directory: ./engines/stage-tamagotchi-godot | |
| run: | | |
| mkdir -p out/linux | |
| godot --headless --export-release "Linux x64" out/linux/godot-stage | |
| unit-test: | |
| name: Unit Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Turborepo | |
| - name: Cache turbo build setup | |
| uses: actions/cache@v5 | |
| with: | |
| path: .turbo | |
| key: ${{ runner.os }}-turbo-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-turbo- | |
| - uses: pnpm/setup@v2 | |
| with: | |
| runtime: node@26.7.0 | |
| cache: true | |
| install: false | |
| # # Setup .NET and Godot | |
| # - name: Setup .NET | |
| # if: matrix.app_name == 'stage-tamagotchi-godot' | |
| # uses: actions/setup-dotnet@v4 | |
| # with: | |
| # dotnet-version: '10.0.x' | |
| # - name: Setup Godot | |
| # if: matrix.app_name == 'stage-tamagotchi-godot' | |
| # uses: chickensoft-games/setup-godot@v2 | |
| # with: | |
| # version: 4.7.1 | |
| # use-dotnet: true | |
| # include-templates: true | |
| - run: pnpm install --frozen-lockfile | |
| - name: Setup Playwright | |
| run: npx playwright install chromium | |
| - run: pnpm run build:packages | |
| - run: pnpm run test:run | |
| env: | |
| NODE_OPTIONS: --no-experimental-webstorage | |
| typecheck: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| if: ${{ !(github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.label, 'moeru-ai:i18n/')) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Node.js | |
| - uses: pnpm/setup@v2 | |
| with: | |
| runtime: node@26.7.0 | |
| cache: true | |
| install: false | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run typecheck | |
| check-provenance: | |
| name: Check Provenance | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: danielroe/provenance-action@main | |
| id: check | |
| with: | |
| fail-on-provenance-change: true # optional, default: false | |
| # lockfile: pnpm-lock.yaml # optional | |
| # base-ref: origin/main # optional, default: origin/main | |
| # fail-on-downgrade: true # optional, default: true | |
| - name: Print result | |
| run: "echo 'Downgraded: ${{ steps.check.outputs.downgraded }}'" |