Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring actions #418

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f2a026f
add performance budget to spotlight app
ethangardner Dec 17, 2024
e6dbeea
add performance budget to spotlight app
ethangardner Dec 17, 2024
4ad7052
add performance budget to design package
ethangardner Dec 18, 2024
a32da6f
Merge branch 'feature/413-performance-budget' of https://github.com/G…
ethangardner Dec 18, 2024
1b44601
add new actions
ethangardner Dec 18, 2024
8c9ff61
add pnpm install
ethangardner Dec 18, 2024
0b7649a
remove db file from git
ethangardner Dec 18, 2024
96e7014
specify package manager
ethangardner Dec 18, 2024
70820fb
skip build step in action
ethangardner Dec 18, 2024
5f25ccd
add minor version string to action
ethangardner Dec 18, 2024
ef91f39
build during action
ethangardner Dec 18, 2024
e4408b7
add build step to perf budget
ethangardner Dec 18, 2024
7d38941
add build step to perf budget
ethangardner Dec 18, 2024
e05706c
remove dependency. already in devDependencies
ethangardner Dec 18, 2024
b988567
remove dependency. already in devDependencies
ethangardner Dec 18, 2024
fa49356
Merge branch 'feature/413-performance-budget' of https://github.com/G…
ethangardner Dec 18, 2024
7de4d78
update lockfile
ethangardner Dec 18, 2024
9577975
test design package
ethangardner Dec 18, 2024
39fade5
Revert "test design package"
ethangardner Dec 18, 2024
c4acf4c
make install and build workflow reusable
ethangardner Dec 19, 2024
228461a
Revert "make install and build workflow reusable"
ethangardner Dec 19, 2024
3ca84ae
split out node setup and build for reusability
ethangardner Dec 19, 2024
c4c99ba
Revert "split out node setup and build for reusability"
ethangardner Dec 19, 2024
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
66 changes: 66 additions & 0 deletions .github/workflows/_performance-budget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "Performance checks"

on:
workflow_call:

permissions:
pull-requests: write

jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Read node version from `.nvmrc` file
id: nvmrc
shell: bash
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)

- name: Install required node.js version
uses: actions/setup-node@v4
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}

- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- uses: andresz1/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
package_manager: pnpm
skip_step: build
directory: ./apps/spotlight

- uses: andresz1/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
package_manager: pnpm
skip_step: build
directory: ./packages/design
11 changes: 11 additions & 0 deletions .github/workflows/monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Monitor budget

on:
push:
branches:
- main
pull_request:

jobs:
performance-budget:
uses: ./.github/workflows/_performance-budget.yml
18 changes: 16 additions & 2 deletions apps/spotlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,19 @@
"build": "astro build",
"clean": "rimraf dist tsconfig.tsbuildinfo coverage",
"dev": "astro dev",
"preview": "astro preview"
"preview": "astro preview",
"size": "pnpm build && size-limit"
},
"size-limit": [
{
"path": "dist/_astro/*.css",
"limit": "50 kB"
},
{
"path": "dist/_astro/*.js",
"limit": "425 kB"
}
],
"dependencies": {
"@astrojs/react": "^3.6.1",
"@atj/common": "workspace:*",
Expand All @@ -25,7 +36,10 @@
},
"devDependencies": {
"@astrojs/check": "^0.4.1",
"@size-limit/preset-app": "^11.1.6",
"@types/qs": "^6.9.15",
"@types/react": "^18.3.3"
"@types/react": "^18.3.3",
"sharp": "^0.33.5",
"size-limit": "^11.1.6"
}
}
9 changes: 9 additions & 0 deletions packages/design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dev:storybook": "storybook dev -p 9009",
"dev:styles": "gulp watch",
"lint": "eslint --ext ts,tsx --report-unused-disable-directives --max-warnings 0 src",
"size": "pnpm build && size-limit",
"test:url": "test-storybook --url http://127.0.0.1:9009 --config-dir .storybook",
"test:dev": "wait-on tcp:127.0.0.1:9009 && pnpm test:url --maxWorkers=2 # assumes dev server is running",
"test:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm build:storybook --quiet && pnpm http-server storybook-static --port 9009 --silent\" \"pnpm test:dev\"",
Expand All @@ -24,6 +25,12 @@
"files": [
"dist/**/*"
],
"size-limit": [
{
"path": "dist/index.js",
"limit": "325 kB"
}
],
"devDependencies": {
"@playwright/test": "1.48.1",
"@storybook/addon-a11y": "^8.2.8",
Expand Down Expand Up @@ -70,6 +77,7 @@
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@size-limit/preset-big-lib": "^11.1.6",
"@tiptap/core": "^2.6.2",
"@tiptap/react": "^2.6.2",
"@tiptap/starter-kit": "^2.6.2",
Expand All @@ -80,6 +88,7 @@
"react": "^18.3.1",
"react-hook-form": "^7.52.2",
"react-router-dom": "^6.26.0",
"size-limit": "^11.1.6",
"storybook": "^8.2.8",
"zustand": "^4.5.4",
"zustand-utils": "^1.3.2"
Expand Down
Loading
Loading