add dataset and model size to run info #1189
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Development | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
quality-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run quality checks | |
run: tox -e quality | |
ui-quality-checks: | |
permissions: | |
contents: "read" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run quality and typing checks | |
run: npm run lint | |
type-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run quality checks | |
run: tox -e types | |
ui-type-checks: | |
permissions: | |
contents: "read" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run quality and typing checks | |
run: npm run type-check | |
precommit-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install pre-commit | |
- name: Run pre-commit checks | |
run: SKIP=ruff-format pre-commit run --all-files | |
ui-precommit-checks: | |
permissions: | |
contents: "read" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run pre-commit checks | |
run: npx husky run pre-commit | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run unit tests | |
run: tox -e test-unit | |
ui-unit-tests: | |
permissions: | |
contents: "read" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run unit tests | |
run: npm run test:unit | |
integration-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run integration tests | |
run: tox -e test-integration -- -m smoke | |
ui-integration-tests: | |
permissions: | |
contents: "read" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run integration tests | |
run: npm run test:integration | |
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: Set up Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- 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://blog.vllm.ai/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://blog.vllm.ai/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" | |
build-and-push-container: | |
# Only build if the PR branch is local | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Buildah build | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: ${{ github.event.repository.name }} | |
build-args: | | |
GUIDELLM_BUILD_TYPE=dev | |
tags: "pr-${{ github.event.number }}" | |
containerfiles: | | |
./Containerfile | |
- name: Push To ghcr.io | |
id: push-to-ghcr | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
registry: ghcr.io/${{ github.repository_owner }} |