From 0edaab30dd16dad4844df68911a89f178776007c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 00:22:47 +0000 Subject: [PATCH 1/7] Add CI workflow to run tests on pull requests Agent-Logs-Url: https://github.com/Shane32/fork-mdxeditor/sessions/448da223-7457-4188-b3f2-62b6a80058c0 Co-authored-by: Shane32 <6377684+Shane32@users.noreply.github.com> --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..2d6dd225 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + pull_request: + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Lint + run: npm run lint + + - name: Typecheck + run: npm run typecheck + + - name: Test + run: npm run test:once From 9b394b2dbfbc8382b53655f3ddf1059b9dab6df5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 00:29:28 +0000 Subject: [PATCH 2/7] Update CI workflow: remove npm cache, use node version from package.json, upgrade actions to v4 Agent-Logs-Url: https://github.com/Shane32/fork-mdxeditor/sessions/2d81bde9-3554-4958-9df3-29e19454e604 Co-authored-by: Shane32 <6377684+Shane32@users.noreply.github.com> --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d6dd225..d83a1d73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,13 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 'lts/*' - cache: 'npm' + node-version-file: 'package.json' - name: Install dependencies run: npm install From 40d5d7eca998d5ffa8b97fe0363b58ddee8973e3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 00:30:55 +0000 Subject: [PATCH 3/7] Update CI: bump actions/checkout and actions/setup-node to v6 Agent-Logs-Url: https://github.com/Shane32/fork-mdxeditor/sessions/a9c17020-9f5d-4d40-83b7-b18e28a8e4fb Co-authored-by: Shane32 <6377684+Shane32@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d83a1d73..2be5f977 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,10 +9,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: 'package.json' From 7ccdf884ef9af239262f8abb72fa114204fbebb1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 00:32:58 +0000 Subject: [PATCH 4/7] CI: add build-js and build-docs jobs Agent-Logs-Url: https://github.com/Shane32/fork-mdxeditor/sessions/86480785-aad0-4ec7-ade9-9df0b687c941 Co-authored-by: Shane32 <6377684+Shane32@users.noreply.github.com> --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2be5f977..f52f29df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,3 +27,39 @@ jobs: - name: Test run: npm run test:once + + build-js: + name: Build JS + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version-file: 'package.json' + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + build-docs: + name: Build Docs + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version-file: 'package.json' + + - name: Install dependencies + run: npm install + + - name: Build Docs + run: npm run build:docs:api From e76a7b78a865cf0d8d970487e01502466b775bb4 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Sun, 12 Apr 2026 20:39:16 -0400 Subject: [PATCH 5/7] fix: simplify test scripts and set NODE_ENV in Vite config --- package.json | 4 ++-- vite.config.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6463663c..3ad8c713 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "dev": "LADLE=true ladle dev", "typecheck": "tsc --noEmit", "lint": "eslint src --ext .ts,.tsx", - "test": "NODE_ENV=development vitest", - "test:once": "NODE_ENV=development vitest --run", + "test": "vitest", + "test:once": "vitest --run", "semantic-release": "semantic-release", "image-upload-backend": "node ./src/examples/file-backend.js", "export-icons": "node ./scripts/export-figma-icons.mjs" diff --git a/vite.config.ts b/vite.config.ts index c929b3f4..99266888 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -73,6 +73,9 @@ export default defineConfig({ include: ['src/test/**/*.test.{ts,tsx}'], environment: 'jsdom', setupFiles: ['src/test/setup.ts'], + env: { + NODE_ENV: 'development', + }, }, css: { modules: { From bdbbc33040d9dd08a834860452c2ad202d79173b Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Sun, 19 Apr 2026 16:51:02 -0400 Subject: [PATCH 6/7] Apply suggestion from @Shane32 --- vite.config.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 601295b3..391438b0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -71,9 +71,6 @@ export default defineConfig({ include: ['src/test/**/*.test.{ts,tsx}'], environment: 'jsdom', setupFiles: ['src/test/setup.ts'], - env: { - NODE_ENV: 'development', - }, }, css: { modules: { From 56770dcf88fb7e550958026f7eb8669794f88c53 Mon Sep 17 00:00:00 2001 From: Petyo Ivanov Date: Sat, 9 May 2026 15:02:19 +0300 Subject: [PATCH 7/7] ci: harden pull request workflow --- .github/workflows/ci.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f52f29df..c7796272 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,18 @@ name: CI on: pull_request: +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + jobs: test: name: Test runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout uses: actions/checkout@v6 @@ -14,10 +22,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version-file: 'package.json' + node-version: 'lts/*' + cache: npm - name: Install dependencies - run: npm install + run: npm ci - name: Lint run: npm run lint @@ -31,6 +40,7 @@ jobs: build-js: name: Build JS runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout uses: actions/checkout@v6 @@ -38,10 +48,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version-file: 'package.json' + node-version: 'lts/*' + cache: npm - name: Install dependencies - run: npm install + run: npm ci - name: Build run: npm run build @@ -49,6 +60,7 @@ jobs: build-docs: name: Build Docs runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout uses: actions/checkout@v6 @@ -56,10 +68,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version-file: 'package.json' + node-version: 'lts/*' + cache: npm - name: Install dependencies - run: npm install + run: npm ci - name: Build Docs run: npm run build:docs:api