A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
ci: problem matchers (#8798)
Myles Scolnickb92b317f96fc
diff --git a/.github/actions/pr-comment-on-failure/action.yaml b/.github/actions/pr-comment-on-failure/action.yamlindex bbdc73bd16..d66ffde5ac 100644--- a/.github/actions/pr-comment-on-failure/action.yaml+++ b/.github/actions/pr-comment-on-failure/action.yaml@@ -1,5 +1,5 @@-name: "PR Comment on Failure"-description: "Comments on PRs from forks when checks fail"+name: "Job Summary on Failure"+description: "Adds a job summary when checks fail, helping contributors fix issues"inputs:check-name:description: "The name of the check that failed"@@ -7,57 +7,14 @@ inputs:command:description: "The command that contributors should run"required: true- github-token:- description: "GitHub token for commenting"- required: trueruns:using: "composite"steps:- - name: Comment on PR- if: github.event.pull_request.head.repo.fork == true- uses: actions/github-script@v7- with:- github-token: ${{ inputs.github-token }}- script: |- const checkName = '${{ inputs.check-name }}';- const command = '${{ inputs.command }}';-- const body = `👋 It looks like the **${checkName}** check failed.-- To fix this locally, please run:-- \`\`\`bash- ${command}- \`\`\`- `;-- // Check if we already commented- const { data: comments } = await github.rest.issues.listComments({- owner: context.repo.owner,- repo: context.repo.repo,- issue_number: context.issue.number,- });-- const botComment = comments.find(comment =>- comment.user.type === 'Bot' &&- comment.body.includes(checkName)- );-- if (botComment) {- // Update existing comment- await github.rest.issues.updateComment({- owner: context.repo.owner,- repo: context.repo.repo,- comment_id: botComment.id,- body: body- });- } else {- // Create new comment- await github.rest.issues.createComment({- owner: context.repo.owner,- repo: context.repo.repo,- issue_number: context.issue.number,- body: body- });- }+ - name: Add failure summary+ shell: bash+ env:+ CHECK_NAME: ${{ inputs.check-name }}+ COMMAND: ${{ inputs.command }}+ run: |+ printf '### 👋 The **%s** check failed\n\nTo fix this locally, please run:\n\n```bash\n%s\n```\n' "$CHECK_NAME" "$COMMAND" >> "$GITHUB_STEP_SUMMARY"diff --git a/.github/problemMatchers/mypy.json b/.github/problemMatchers/mypy.jsonnew file mode 100644index 0000000000..a17bfa1b5e--- /dev/null+++ b/.github/problemMatchers/mypy.json@@ -0,0 +1,17 @@+{+ "problemMatcher": [+ {+ "owner": "mypy",+ "severity": "error",+ "pattern": [+ {+ "regexp": "^([^:]+):(\\d+): (error|warning): (.+)$",+ "file": 1,+ "line": 2,+ "severity": 3,+ "message": 4+ }+ ]+ }+ ]+}diff --git a/.github/problemMatchers/tsc.json b/.github/problemMatchers/tsc.jsonnew file mode 100644index 0000000000..ec32b558cd--- /dev/null+++ b/.github/problemMatchers/tsc.json@@ -0,0 +1,19 @@+{+ "problemMatcher": [+ {+ "owner": "tsc",+ "severity": "error",+ "pattern": [+ {+ "regexp": "^.*?([^\\s(]+)\\((\\d+),(\\d+)\\): (error|warning) (TS\\d+): (.+)$",+ "file": 1,+ "line": 2,+ "column": 3,+ "severity": 4,+ "code": 5,+ "message": 6+ }+ ]+ }+ ]+}diff --git a/.github/workflows/test_be.yaml b/.github/workflows/test_be.yamlindex 0462dfce25..9e8987a62b 100644--- a/.github/workflows/test_be.yaml+++ b/.github/workflows/test_be.yaml@@ -11,7 +11,6 @@ concurrency:permissions:contents: read- pull-requests: writeenv:MARIMO_SKIP_UPDATE_CHECK: 1@@ -51,13 +50,13 @@ jobs:id: docsrun: uv run --group docs mkdocs build --strict- - name: Comment on docs failure+ - name: Summarize docs failureif: failure() && steps.docs.outcome == 'failure'uses: ./.github/actions/pr-comment-on-failure+ continue-on-error: truewith:check-name: "docs build"command: "uv run --group docs mkdocs build --strict"- github-token: ${{ secrets.GITHUB_TOKEN }}test_check:needs: changes@@ -73,27 +72,30 @@ jobs:- name: 🧹 Lintid: lint- run: uv run ruff check --fix+ run: uv run ruff check --fix --output-format=github++ - name: 📋 Register mypy problem matcher+ run: echo "::add-matcher::.github/problemMatchers/mypy.json"- name: 🔍 Typecheckid: typecheckrun: uv run --only-group typecheck mypy marimo --exclude=marimo/_tutorials/- - name: Comment on lint failure+ - name: Summarize lint failureif: failure() && steps.lint.outcome == 'failure'+ continue-on-error: trueuses: ./.github/actions/pr-comment-on-failurewith:check-name: "lint"command: "uv run ruff check --fix"- github-token: ${{ secrets.GITHUB_TOKEN }}- - name: Comment on typecheck failure+ - name: Summarize typecheck failureif: failure() && steps.typecheck.outcome == 'failure'+ continue-on-error: trueuses: ./.github/actions/pr-comment-on-failurewith:check-name: "typecheck"command: "uv run --only-group typecheck mypy marimo --exclude=marimo/_tutorials/"- github-token: ${{ secrets.GITHUB_TOKEN }}# For PRs, we only run the tests for the changed files.# If there is a `test-all` label, we run the tests across unchanged files as well.diff --git a/.github/workflows/test_fe.yaml b/.github/workflows/test_fe.yamlindex 08410a310d..bc8079a682 100644--- a/.github/workflows/test_fe.yaml+++ b/.github/workflows/test_fe.yaml@@ -11,7 +11,6 @@ concurrency:permissions:contents: read- pull-requests: writeenv:TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}@@ -72,29 +71,26 @@ jobs:exit 1fi- - name: Comment on lint failure+ - name: Summarize lint failureif: failure() && steps.lint.outcome == 'failure'uses: ./.github/actions/pr-comment-on-failurewith:check-name: "lint"command: "pnpm turbo lint"- github-token: ${{ secrets.GITHUB_TOKEN }}- - name: Comment on clean-tree failure after lint+ - name: Summarize clean-tree failure after lintif: failure() && steps.lint_clean_tree.outcome == 'failure'uses: ./.github/actions/pr-comment-on-failurewith:check-name: "clean-tree"command: "pnpm turbo lint && git status --short"- github-token: ${{ secrets.GITHUB_TOKEN }}- - name: Comment on dedupe failure+ - name: Summarize dedupe failureif: failure() && steps.dedupe.outcome == 'failure'uses: ./.github/actions/pr-comment-on-failurewith:check-name: "dedupe"command: "pnpm dedupe"- github-token: ${{ secrets.GITHUB_TOKEN }}test_frontend:needs: changes@@ -116,6 +112,9 @@ jobs:- name: 📥 Install repouses: ./.github/actions/install+ - name: 📋 Register tsc problem matcher+ run: echo "::add-matcher::${{ github.workspace }}/.github/problemMatchers/tsc.json"+- name: 🔎 Type checkid: typecheckrun: pnpm turbo typecheck@@ -135,29 +134,26 @@ jobs:id: testrun: pnpm turbo test- - name: Comment on typecheck failure+ - name: Summarize typecheck failureif: failure() && steps.typecheck.outcome == 'failure'uses: ./.github/actions/pr-comment-on-failurewith:check-name: "typecheck"command: "pnpm turbo typecheck"- github-token: ${{ secrets.GITHUB_TOKEN }}- - name: Comment on test failure+ - name: Summarize test failureif: failure() && steps.test.outcome == 'failure'uses: ./.github/actions/pr-comment-on-failurewith:check-name: "test"command: "pnpm turbo test"- github-token: ${{ secrets.GITHUB_TOKEN }}- - name: Comment on clean-tree failure after typecheck+ - name: Summarize clean-tree failure after typecheckif: failure() && steps.typecheck_clean_tree.outcome == 'failure'uses: ./.github/actions/pr-comment-on-failurewith:check-name: "clean-tree"command: "pnpm turbo typecheck && git status --short"- github-token: ${{ secrets.GITHUB_TOKEN }}build_frontend:needs: changes@@ -210,10 +206,9 @@ jobs:pnpm turbo build:islands./islands/validate.sh- - name: Comment on build failure+ - name: Summarize build failureif: failure() && steps.build.outcome == 'failure'uses: ./.github/actions/pr-comment-on-failurewith:check-name: "build"command: "pnpm turbo build"- github-token: ${{ secrets.GITHUB_TOKEN }}diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.tsindex ff11641d31..76e243796d 100644--- a/frontend/vitest.config.ts+++ b/frontend/vitest.config.ts@@ -5,6 +5,10 @@ import { defineConfig } from "vitest/config";export default defineConfig({test: {+ reporters:+ process.env.GITHUB_ACTIONS === "true"+ ? ["default", "github-actions"]+ : ["default"],environment: "jsdom",include: ["src/**/*.test.ts", "src/**/*.test.tsx"],setupFiles: ["src/__tests__/setup.ts"],