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
17 changes: 17 additions & 0 deletions .github/actions/prepare-runner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Setup runner'
description: 'It setups pnpm, node and installs dependencies'
runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile --ignore-scripts
17 changes: 17 additions & 0 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check bundle size
on:
push:
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-runner
- run: pnpm build
- run: pnpm lint:size
14 changes: 2 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
uses: actions/checkout@v4
- uses: ./.github/actions/prepare-runner
- name: Run tests
run: pnpm test
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"test:types": "tsc --skipLibCheck --noEmit",
"test:unit:ui": "vitest --watch=false --coverage -c vite.config.ui.ts",
"test:unit:api": "vitest --watch=false --coverage -c vite.config.api.ts",
"test": "pnpm run /^test:/"
"test": "pnpm run /^test:/",
"lint:size": "size-limit"
},
"dependencies": {
"@figma/plugin-typings": "^1.79.0",
Expand Down Expand Up @@ -51,6 +52,7 @@
"vitest": "^0.34.1"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^11.2.0",
"@types/node": "^20.4.1",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
Expand All @@ -70,7 +72,13 @@
"eslint-plugin-tailwindcss": "^3.13.0",
"jsdom": "^22.1.0",
"prettier": "^3.0.2",
"size-limit": "^11.2.0",
"terser": "^5.19.0"
},
"size-limit": [
{
"path": "dist/api.js"
}
],
"license": "MIT"
}
Loading