Skip to content

OpenCode Go config #17627

OpenCode Go config

OpenCode Go config #17627

Workflow file for this run

name: Test FE
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # 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: ⬇️ Checkout repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # 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: πŸ”’ Verify clean git tree after lint
id: lint_clean_tree
run: |
CHANGES="$(git status --porcelain)"
if [[ -n "$CHANGES" ]]; then
echo "Lint changed tracked files. Commit generated/autofixed files."
echo "$CHANGES"
git --no-pager diff --stat
exit 1
fi
- name: Summarize lint failure
if: failure() && steps.lint.outcome == 'failure'
uses: ./.github/actions/pr-comment-on-failure
with:
check-name: "lint"
command: "pnpm turbo lint"
- name: Summarize clean-tree failure after lint
if: failure() && steps.lint_clean_tree.outcome == 'failure'
uses: ./.github/actions/pr-comment-on-failure
with:
check-name: "clean-tree"
command: "pnpm turbo lint && git status --short"
- name: Summarize dedupe failure
if: failure() && steps.dedupe.outcome == 'failure'
uses: ./.github/actions/pr-comment-on-failure
with:
check-name: "dedupe"
command: "pnpm dedupe"
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: ⬇️ Checkout repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
- name: πŸ“₯ Install repo
uses: ./.github/actions/install
- name: πŸ“‹ Register tsc problem matcher
run: echo "::add-matcher::${{ github.workspace }}/.github/problemMatchers/tsc.json"
- name: πŸ”Ž Type check
id: typecheck
run: pnpm turbo typecheck
- name: πŸ”’ Verify clean git tree after typecheck
id: typecheck_clean_tree
run: |
CHANGES="$(git status --porcelain)"
if [[ -n "$CHANGES" ]]; then
echo "Typecheck/codegen changed tracked files. Commit generated files."
echo "$CHANGES"
git --no-pager diff --stat
exit 1
fi
- name: πŸ§ͺ Test
id: test
run: pnpm turbo test
- name: Summarize typecheck failure
if: failure() && steps.typecheck.outcome == 'failure'
uses: ./.github/actions/pr-comment-on-failure
with:
check-name: "typecheck"
command: "pnpm turbo typecheck"
- name: Summarize test failure
if: failure() && steps.test.outcome == 'failure'
uses: ./.github/actions/pr-comment-on-failure
with:
check-name: "test"
command: "pnpm turbo test"
- name: Summarize clean-tree failure after typecheck
if: failure() && steps.typecheck_clean_tree.outcome == 'failure'
uses: ./.github/actions/pr-comment-on-failure
with:
check-name: "clean-tree"
command: "pnpm turbo typecheck && git status --short"
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: ⬇️ Checkout repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # 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
if ! grep -q '"html-to-image": "1.11.13"' package.json; then
echo "Error: html-to-image version in package.json must be exactly 1.11.13. Newer versions break matplotlib toolbars"
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: Summarize build failure
if: failure() && steps.build.outcome == 'failure'
uses: ./.github/actions/pr-comment-on-failure
with:
check-name: "build"
command: "pnpm turbo build"