Skip to content

Implement UI build pipeline #174

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

Open
wants to merge 154 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
f5fde81
set up next.js app and static build
DaltheCow May 9, 2025
fa5db74
convert to .eslintrc to match current state of project
DaltheCow May 9, 2025
8b16db5
update .eslintrc, tsconfig.json
DaltheCow May 9, 2025
15e867d
update eslint, tsconfig, husky, and dependencies
DaltheCow May 12, 2025
f7837ca
update file type
DaltheCow May 12, 2025
59ff861
merge
DaltheCow May 12, 2025
834cc1a
remove .eslintrc
DaltheCow May 12, 2025
3ae85e2
final updates
DaltheCow May 12, 2025
50a39ec
sort eslintrc
DaltheCow May 13, 2025
e1fd9ed
merge base
DaltheCow May 13, 2025
119f05a
sort extensions
DaltheCow May 13, 2025
56f89e2
merge base
DaltheCow May 13, 2025
d923f4a
sort
DaltheCow May 13, 2025
a515e12
resort
DaltheCow May 13, 2025
ded66cd
add extension
DaltheCow May 13, 2025
fe4d91a
merge base
DaltheCow May 13, 2025
544899a
add dev workflow
DaltheCow May 13, 2025
026a13f
remove testing pieces
DaltheCow May 13, 2025
fca89c5
navigate to ui directory for operations
DaltheCow May 13, 2025
b276f17
navigate to directory
DaltheCow May 13, 2025
32e95e9
add makefile
DaltheCow May 13, 2025
9faebcf
upgrade eslint-plugin-prettier, run make style
DaltheCow May 13, 2025
d69dc95
add unit/integration/e2e testing
DaltheCow May 13, 2025
f876edb
get testing set up fully functional
DaltheCow May 14, 2025
472141b
get things working
DaltheCow May 14, 2025
d98b411
remove e2e testing from dev workflow since it is confirmed to work
DaltheCow May 14, 2025
23ce95f
clean readme, add developing doc
DaltheCow May 15, 2025
a7b89f1
add initial app state for development with redux/theming set up
DaltheCow May 19, 2025
699eb9b
add test mocks
DaltheCow May 19, 2025
41345f4
move svg typing
DaltheCow May 19, 2025
0e688da
implement guidellm ui app
DaltheCow May 19, 2025
f92a82e
update ui to pass integration test
DaltheCow May 19, 2025
4461583
Update Readme towards desired usage pathway
DaltheCow May 19, 2025
fe7fdc6
update readme
DaltheCow May 19, 2025
35a0726
Merge branch 'main' into implement-base-ui-app
DaltheCow May 20, 2025
8413655
run linting
DaltheCow May 20, 2025
c23c674
replace speculators with GuideLLM
DaltheCow May 21, 2025
1d5bd73
remove speculators from docs
DaltheCow May 21, 2025
43fdeb0
update tox.ini to exclude github view files (blobs) that break the li…
DaltheCow May 21, 2025
1e29968
not to ignore more than markdown for rich display mode
DaltheCow May 21, 2025
d09f685
Merge branch 'update-docs' into implement-base-ui-app
DaltheCow May 21, 2025
328b872
Merge branch 'implement-base-ui-app' into core-framework-setup
DaltheCow May 21, 2025
1fc4d40
merge core-framework-setup
DaltheCow May 21, 2025
fbc8821
merge testing-tooling
DaltheCow May 21, 2025
3d028a6
Merge branch 'implement-app-tooling' into implement-guidellm-ui
DaltheCow May 21, 2025
32cbe07
run precommit check
DaltheCow May 21, 2025
4b8b65a
run precommit
DaltheCow May 22, 2025
8d10bd5
precommit check
DaltheCow May 22, 2025
5043cdb
precommit check
DaltheCow May 22, 2025
247d1cf
undo alteration of link checks, instead remove from workflows tempora…
DaltheCow May 22, 2025
4de602a
Merge branch 'update-docs' into implement-base-ui-app
DaltheCow May 22, 2025
bf52aa0
Merge branch 'implement-base-ui-app' into core-framework-setup
DaltheCow May 22, 2025
20fba13
merge core-framework-setup
DaltheCow May 22, 2025
4057c9c
Merge branch 'testing-tooling' into implement-app-tooling
DaltheCow May 22, 2025
dc2bc80
Merge branch 'implement-app-tooling' into implement-guidellm-ui
DaltheCow May 22, 2025
57e5c0a
Merge branch 'main' into implement-base-ui-app
DaltheCow May 27, 2025
40794dd
Merge branch 'main' into implement-ui-build-pipeline
DaltheCow May 28, 2025
aece79d
Merge branch 'main' into implement-base-ui-app
markurtz May 29, 2025
3000131
add workflows and gh pages builds
DaltheCow May 29, 2025
66459db
Merge branch 'main' into implement-ui-build-pipeline
DaltheCow May 29, 2025
49e1b64
merge base
DaltheCow May 29, 2025
fd473fb
Merge branch 'implement-base-ui-app' into core-framework-setup
DaltheCow May 29, 2025
af1a0eb
Merge branch 'core-framework-setup' into testing-tooling
DaltheCow May 29, 2025
fa46413
Merge branch 'testing-tooling' into implement-app-tooling
DaltheCow May 29, 2025
502025e
Merge branch 'implement-app-tooling' into implement-guidellm-ui
DaltheCow May 29, 2025
a455187
Merge branch 'implement-guidellm-ui' into implement-ui-build-pipeline
DaltheCow May 29, 2025
1ee5719
fix link to pr build
DaltheCow May 29, 2025
7b3eeb7
Merge branch 'implement-ui-build-pipeline' of github.com:neuralmagic/…
DaltheCow May 29, 2025
d3b6e61
update publish dir
DaltheCow May 29, 2025
bb68088
print out index.html to see asset issues
DaltheCow May 29, 2025
faef15f
I had forgotten to use the asset prefix in next.config.mjs
DaltheCow May 29, 2025
8f215e3
env files weren't committed
DaltheCow May 29, 2025
cde932f
merge main
DaltheCow Jun 2, 2025
c7d115d
fix all the configs and get things working again
DaltheCow Jun 3, 2025
9441f7f
update workflow, DEVELOPING.md, add cypress to scripts
DaltheCow Jun 3, 2025
798c37d
remove .eslintignore
DaltheCow Jun 3, 2025
bdef8dc
correct script usage in workflow
DaltheCow Jun 3, 2025
b805721
move code to prep for merge with base
DaltheCow Jun 3, 2025
cc99e3f
merge updated base
DaltheCow Jun 3, 2025
46e5cad
remove unwanted files
DaltheCow Jun 3, 2025
db6ab10
remove merge conflict remnant
DaltheCow Jun 3, 2025
a90b430
get everything working
DaltheCow Jun 5, 2025
aaa6aeb
change working directory for ui workflows
DaltheCow Jun 5, 2025
83d6f44
add test coverage setup
DaltheCow Jun 5, 2025
1f27e59
Merge branch 'main' into testing-tooling
DaltheCow Jun 5, 2025
313ca9f
move code in prep of merging the base
DaltheCow Jun 5, 2025
1308ea3
merge base into branch, fix new issues
DaltheCow Jun 6, 2025
88509a1
Update src/ui/app/layout.tsx
DaltheCow Jun 6, 2025
002f926
push up simple requested changes
DaltheCow Jun 6, 2025
1b04fb0
Merge branch 'implement-app-tooling' of github.com:neuralmagic/guidel…
DaltheCow Jun 6, 2025
f29d89b
push up fixed to layout component
DaltheCow Jun 7, 2025
33375fc
fix accidentally broken test running, remove uneeded type
DaltheCow Jun 7, 2025
43c7163
add some basic generated documentation for some util methods
DaltheCow Jun 7, 2025
ec10b92
add any type to next config
DaltheCow Jun 7, 2025
9261c01
merge base, fix some issues, but not all
DaltheCow Jun 9, 2025
aa5273d
get tests working, integration and unit are the same though, need to …
DaltheCow Jun 10, 2025
058fb6a
merge main and fix conflicts
DaltheCow Jun 10, 2025
eeafc1e
remove ts-jest again since it snuck back in
DaltheCow Jun 10, 2025
2f72e78
update test coverage to be joint
DaltheCow Jun 10, 2025
7a0f64e
update to use guidellm logo and icon
DaltheCow Jun 10, 2025
1405011
fix bugs
DaltheCow Jun 10, 2025
7ade7c7
run precommit fixes
DaltheCow Jun 10, 2025
d786477
try to fix gh action type error
DaltheCow Jun 10, 2025
9a29fb8
run styling
DaltheCow Jun 10, 2025
220e627
add next to types in tsconfig
DaltheCow Jun 10, 2025
4230108
remove what is causing the issue
DaltheCow Jun 10, 2025
8de645d
try something else
DaltheCow Jun 10, 2025
c5c165f
Merge branch 'implement-app-tooling' into implement-guidellm-ui
DaltheCow Jun 10, 2025
ad3623a
remove copied file
DaltheCow Jun 10, 2025
6bb9524
update husky setup, migrate to eslint flat config
DaltheCow Jun 10, 2025
609349c
update jest config to cjs, fix typing error
DaltheCow Jun 10, 2025
ca7dab3
try to fix type issue
DaltheCow Jun 10, 2025
42bf248
try some stuff that won't work
DaltheCow Jun 10, 2025
956ab9f
try something else that won't work
DaltheCow Jun 10, 2025
a554685
change up types in tsconfig
DaltheCow Jun 11, 2025
2d8f6ed
merge main
DaltheCow Jun 11, 2025
2c24164
add weird dependencies to try and fix CI test failure
DaltheCow Jun 11, 2025
64b2938
update eslint config comments
DaltheCow Jun 11, 2025
c02f701
update config comments
DaltheCow Jun 11, 2025
69c9ff0
merge base and fix lint/type errors and update configs
DaltheCow Jun 11, 2025
d0bd7db
update eslint config comments
DaltheCow Jun 11, 2025
2e597b0
merge base
DaltheCow Jun 11, 2025
511e92f
update workflows with ui flows
DaltheCow Jun 12, 2025
1a7dacc
delete potentially problematic dependency, hopefully don't need
DaltheCow Jun 12, 2025
d366b37
delete package-lock, npm i
DaltheCow Jun 12, 2025
985afd2
add pr cleanup workflow
DaltheCow Jun 12, 2025
dc7096c
update workflow for cleanup
DaltheCow Jun 12, 2025
5eaa5b9
update workflow for cleanup
DaltheCow Jun 12, 2025
9c0f043
update workflow to only act on ui file changes
DaltheCow Jun 12, 2025
c1ce502
update formatting
DaltheCow Jun 12, 2025
85071f3
update to make sure it doesn't build when no relevant changes were made
DaltheCow Jun 13, 2025
4226407
update build location
DaltheCow Jun 13, 2025
0fbcd12
remove unnecessary file include
DaltheCow Jun 13, 2025
a1355c0
remove commented code
DaltheCow Jun 13, 2025
542df25
Merge branch 'main' into implement-guidellm-ui
markurtz Jun 17, 2025
5dabb78
add nightly build
DaltheCow Jun 17, 2025
64c7b6b
Merge branch 'implement-guidellm-ui' into implement-ui-build-pipeline
DaltheCow Jun 17, 2025
9524bd9
Merge branch 'main' into implement-guidellm-ui
DaltheCow Jun 20, 2025
efb197a
add configuration for using mock data
DaltheCow Jun 23, 2025
dd668bd
merge base
DaltheCow Jun 23, 2025
fbc5c97
merge base
DaltheCow Jun 24, 2025
60cf3df
temp change to workflow trigger
DaltheCow Jun 24, 2025
aa58de3
add trailing line
DaltheCow Jun 24, 2025
35c1489
Merge branch 'implement-guidellm-ui' into implement-ui-build-pipeline
DaltheCow Jun 24, 2025
0080634
merge main
DaltheCow Jun 24, 2025
8adc431
run precommit fixes
DaltheCow Jun 24, 2025
4ddbc51
see if npm i instead of npm ci fixes build error
DaltheCow Jun 24, 2025
8a114cd
add optional dependencies for build
DaltheCow Jun 24, 2025
b795771
npm i
DaltheCow Jun 24, 2025
6f6dda8
add img handling config to hopefully reduce need for sharp since we d…
DaltheCow Jun 24, 2025
7049f6a
try installing sharp
DaltheCow Jun 24, 2025
46cbef8
try new way to add sharp
DaltheCow Jun 24, 2025
20e9fef
try adding old version of sharp
DaltheCow Jun 24, 2025
0a6dd5e
remove img handler in next config
DaltheCow Jun 24, 2025
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
87 changes: 87 additions & 0 deletions .github/workflows/development-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Cleanup Dev

on:
pull_request:
types: [closed]

jobs:
cleanup-ui-pr-preview:
permissions:
contents: write
id-token: 'write'
issues: write
runs-on: ubuntu-latest

steps:
- name: Check out gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages
fetch-depth: 1

- name: Check if preview directory exists
id: check-preview
run: |
if [ -d "ui/pr/${{ github.event.pull_request.number }}" ]; then
echo "preview_exists=true" >> $GITHUB_OUTPUT
echo "Preview directory exists for PR #${{ github.event.pull_request.number }}"
else
echo "preview_exists=false" >> $GITHUB_OUTPUT
echo "No preview directory found for PR #${{ github.event.pull_request.number }}"
fi

- name: Create an empty directory for cleanup
if: steps.check-preview.outputs.preview_exists == 'true'
run: mkdir -p empty

- name: Remove GitHub Pages Build
if: steps.check-preview.outputs.preview_exists == 'true'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./empty
destination_dir: ui/pr/${{ github.event.pull_request.number }}
keep_files: false
user_name: ${{ github.actor }}
user_email: ${{ github.actor }}@users.noreply.github.com
publish_branch: gh-pages
commit_message: 'chore: Clean up preview for PR #${{ github.event.pull_request.number }}'

- name: Log Cleanup Completion
run: echo "Cleanup completed for PR \#${{ github.event.pull_request.number }}"

update-preview-comment:
needs: [cleanup-ui-pr-preview]
name: Update PR Comment
permissions:
pull-requests: write
issues: write
runs-on: ubuntu-latest
steps:
- name: Update PR comment to reflect cleanup
uses: peter-evans/find-comment@v2
id: find-comment
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body-includes: '<!-- pr-preview-comment -->'

- name: Update PR comment to reflect cleanup
if: steps.find-comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
<!-- pr-preview-comment -->
🧹 The live preview for this PR has been removed.

- name: Log comment update status
run: |
if [ "${{ steps.find-comment.outputs.comment-id }}" != "" ]; then
echo "Updated existing preview comment"
else
echo "No preview comment found to update"
fi
128 changes: 126 additions & 2 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Development

on:
pull_request_target:
pull_request:
types: [opened, synchronize, reopened]

jobs:
Expand Down Expand Up @@ -29,6 +29,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm ci

Expand Down Expand Up @@ -59,6 +64,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm ci

Expand All @@ -81,14 +91,19 @@ jobs:
- name: Run pre-commit checks
run: SKIP=ruff-format pre-commit run --all-files

ui-precommit-check:
ui-precommit-checks:
permissions:
contents: "read"
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm ci

Expand Down Expand Up @@ -119,6 +134,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm ci

Expand Down Expand Up @@ -149,6 +169,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm ci

Expand Down Expand Up @@ -205,3 +230,102 @@ jobs:
They will be retained for **up to 30 days**.
`
})

ui-pr-preview:
needs: [ui-quality-checks, ui-precommit-checks, ui-unit-tests, ui-integration-tests]
permissions:
contents: write
pull-requests: write
issues: write
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check if UI-related files changed
id: check-changes
run: |
BASE_BRANCH=${{ github.event.pull_request.base.ref }}
CHANGED_FILES=$(git diff --name-only origin/$BASE_BRANCH...HEAD)
SHOULD_BUILD=false

if echo "$CHANGED_FILES" | grep -q "^src/ui/"; then
echo "UI source files changed"
SHOULD_BUILD=true
fi

echo "should_build=$SHOULD_BUILD" >> $GITHUB_OUTPUT
echo "Should build: $SHOULD_BUILD"

- name: Install dependencies
if: steps.check-changes.outputs.should_build == 'true'
run: npm ci

- name: Build app to root
if: steps.check-changes.outputs.should_build == 'true'
id: build
run: |
# Export vars to ensure they are loaded before build
export $(grep -v '^#' .env.development | xargs)

PR_NUMBER=${{ github.event.pull_request.number }}
echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT

# Set asset prefix and base path with PR number
ASSET_PREFIX=https://neuralmagic.github.io/guidellm/ui/pr/${PR_NUMBER}
USE_MOCK_DATA=true
BASE_PATH=/ui/pr/${PR_NUMBER}
GIT_SHA=${{ github.sha }}
export ASSET_PREFIX=${ASSET_PREFIX}
export BASE_PATH=${BASE_PATH}
export GIT_SHA=${GIT_SHA}
export USE_MOCK_DATA=${USE_MOCK_DATA}
npm run build

- name: Deploy to GitHub Pages
if: steps.check-changes.outputs.should_build == 'true'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./src/ui/out
destination_dir: ui/pr/${{ steps.build.outputs.pr_number }}
keep_files: false
user_name: ${{ github.actor }}
user_email: ${{ github.actor }}@users.noreply.github.com
publish_branch: gh-pages
commit_message: 'build: Deploy preview build for PR #${{ github.event.pull_request.number }}'

- name: Set deployment url
if: steps.check-changes.outputs.should_build == 'true'
id: deploy
run: |
DEPLOY_URL=https://neuralmagic.github.io/guidellm/ui/pr/${{ steps.build.outputs.pr_number }}
echo "url=${DEPLOY_URL}" >> $GITHUB_OUTPUT

- name: Find PR comment
if: steps.check-changes.outputs.should_build == 'true'
uses: peter-evans/find-comment@v2
id: find-comment
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body-includes: '<!-- pr-preview-comment -->'

- name: Post Deployment URL to PR
if: steps.check-changes.outputs.should_build == 'true'
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
<!-- pr-preview-comment -->
🎉 **Live Preview:** [Click here to view the live version](${{ steps.deploy.outputs.url }})
*Last updated: ${{ github.sha }}*

- name: Skip build notification
if: steps.check-changes.outputs.should_build == 'false'
run: echo "Skipping UI preview build - no relevant files changed"
Loading