WIP: Add Pyrefly support #12438
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 FE | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: marimo | |
| MARIMO_SKIP_UPDATE_CHECK: 1 | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| frontend: ${{ steps.filter.outputs.frontend }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| frontend: | |
| - 'frontend/**' | |
| - 'packages/**' | |
| lint_frontend: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.frontend == 'true' }} | |
| name: 🧹 Lint frontend | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: 🛑 Cancel Previous Runs | |
| uses: styfle/[email protected] | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 📥 Install repo | |
| uses: ./.github/actions/install | |
| - name: 📦 pnpm dedupe | |
| if: github.event_name == 'pull_request' | |
| id: dedupe | |
| run: pnpm dedupe --check | |
| - name: 🧹 Lint | |
| id: lint | |
| run: pnpm turbo lint | |
| - name: Comment on lint failure | |
| if: failure() && steps.lint.outcome == 'failure' | |
| uses: ./.github/actions/pr-comment-on-failure | |
| with: | |
| check-name: "lint" | |
| command: "pnpm turbo lint" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Comment on dedupe failure | |
| if: failure() && steps.dedupe.outcome == 'failure' | |
| uses: ./.github/actions/pr-comment-on-failure | |
| with: | |
| check-name: "dedupe" | |
| command: "pnpm dedupe" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| test_frontend: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.frontend == 'true' }} | |
| name: 🧪 Test frontend | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: ./frontend | |
| shell: bash | |
| steps: | |
| - name: 🛑 Cancel Previous Runs | |
| uses: styfle/[email protected] | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 📥 Install repo | |
| uses: ./.github/actions/install | |
| - name: 🔎 Type check | |
| id: typecheck | |
| run: pnpm turbo typecheck | |
| - name: 🧪 Test | |
| id: test | |
| run: pnpm turbo test | |
| - name: Comment on typecheck failure | |
| if: failure() && steps.typecheck.outcome == 'failure' | |
| uses: ./.github/actions/pr-comment-on-failure | |
| with: | |
| check-name: "typecheck" | |
| command: "pnpm turbo typecheck" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Comment on test failure | |
| if: failure() && steps.test.outcome == 'failure' | |
| uses: ./.github/actions/pr-comment-on-failure | |
| with: | |
| check-name: "test" | |
| command: "pnpm turbo test" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| build_frontend: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.frontend == 'true' }} | |
| name: 📦 Build frontend | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: ./frontend | |
| shell: bash | |
| steps: | |
| - name: 🛑 Cancel Previous Runs | |
| uses: styfle/[email protected] | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 📥 Install repo | |
| uses: ./.github/actions/install | |
| - name: 🔍 Check pinned deps | |
| run: | | |
| if ! grep -q '"react-hook-form": "7.54.2"' package.json; then | |
| echo "Error: react-hook-form version in package.json must be exactly 7.54.2. As it breaks mo.ui.dataframe" | |
| exit 1 | |
| fi | |
| if ! grep -q '"vega-lite": "6.3.1"' package.json; then | |
| echo "Error: vega-lite version in package.json must be exactly 6.3.1. Newer versions break numeric tooltips" | |
| exit 1 | |
| fi | |
| - name: 📦 Build | |
| id: build | |
| run: pnpm turbo build | |
| env: | |
| NODE_ENV: production | |
| - name: 📦 Build islands frontend | |
| env: | |
| NODE_ENV: production | |
| VITE_MARIMO_ISLANDS: "true" | |
| VITE_MARIMO_VERSION: "0.0.0" | |
| run: | | |
| npm version 0.0.0 --no-git-tag-version | |
| pnpm turbo build:islands | |
| ./islands/validate.sh | |
| - name: Comment on build failure | |
| if: failure() && steps.build.outcome == 'failure' | |
| uses: ./.github/actions/pr-comment-on-failure | |
| with: | |
| check-name: "build" | |
| command: "pnpm turbo build" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |