Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ updates:
# yjs packages
- dependency-name: "yjs"
- dependency-name: "y-prosemirror"
ignore:
# Hono packages are used only in the demo AI server and are not part of
# the main editor/runtime surface area.
- dependency-name: "hono"
- dependency-name: "@hono/node-server"
- dependency-name: "@hono/*"
groups:
editor-dependencies:
patterns:
Expand Down
73 changes: 66 additions & 7 deletions .github/workflows/fresh-install-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,91 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v6
- id: checkout
uses: actions/checkout@v6

- name: Install pnpm
- id: install_pnpm
name: Install pnpm
uses: pnpm/action-setup@v5

- uses: actions/setup-node@v6
- id: setup_node
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
# Intentionally no pnpm cache — we want a genuinely fresh install

- name: Remove lockfile to force fresh dep resolution
- id: remove_lockfile
name: Remove lockfile to force fresh dep resolution
# Removing pnpm-lock.yaml causes pnpm to resolve all dependencies to
# the latest versions that satisfy the ranges declared in package.json
# (including pnpm-workspace.yaml overrides). This is equivalent to what
# a new user experiences when installing BlockNote in a blank project.
run: rm pnpm-lock.yaml

- name: Install dependencies
- id: install_dependencies
name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Build packages
- id: build_packages
name: Build packages
run: pnpm run build
env:
NX_SKIP_NX_CACHE: "true"

- name: Run unit tests
- id: run_unit_tests
name: Run unit tests
run: pnpm run test
env:
NX_SKIP_NX_CACHE: "true"

- name: Notify Slack on workflow failure
if: ${{ failure() }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
REPOSITORY: ${{ github.repository }}
WORKFLOW: ${{ github.workflow }}
RUN_ID: ${{ github.run_id }}
RUN_NUMBER: ${{ github.run_number }}
RUN_ATTEMPT: ${{ github.run_attempt }}
BRANCH: ${{ github.ref_name }}
run: |
if [ -z "$SLACK_WEBHOOK_URL" ]; then
echo "SLACK_WEBHOOK_URL is not configured; skipping Slack notification."
exit 0
fi

failed_step="Unknown step"
if [ "${{ steps.checkout.outcome }}" = "failure" ]; then
failed_step="Checkout repository"
elif [ "${{ steps.install_pnpm.outcome }}" = "failure" ]; then
failed_step="Install pnpm"
elif [ "${{ steps.setup_node.outcome }}" = "failure" ]; then
failed_step="Setup Node.js"
elif [ "${{ steps.remove_lockfile.outcome }}" = "failure" ]; then
failed_step="Remove lockfile to force fresh dep resolution"
elif [ "${{ steps.install_dependencies.outcome }}" = "failure" ]; then
failed_step="Install dependencies"
elif [ "${{ steps.build_packages.outcome }}" = "failure" ]; then
failed_step="Build packages"
elif [ "${{ steps.run_unit_tests.outcome }}" = "failure" ]; then
failed_step="Run unit tests"
fi

run_url="https://github.com/${REPOSITORY}/actions/runs/${RUN_ID}"
message=$(printf '%s\n%s\n%s\n%s' \
":warning: Fresh Install Tests failed in *${REPOSITORY}* on branch *${BRANCH}*." \
"*Workflow:* ${WORKFLOW}" \
"*Run:* <${run_url}|#${RUN_NUMBER} (attempt ${RUN_ATTEMPT})>" \
"*Failed step:* ${failed_step}")
payload=$(jq --compact-output --null-input --arg text "$message" '{text: $text}')

curl -sS -X POST \
--fail \
--retry 4 \
--retry-all-errors \
--retry-max-time 60 \
--connect-timeout 10 \
--max-time 30 \
-H "Content-type: application/json" \
--data "$payload" \
"$SLACK_WEBHOOK_URL"
Loading