support multi-moda message (#15) #50
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: Pull Request Validation | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
lint-and-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "latest" | |
- name: Set up Python | |
run: uv python install 3.12 | |
- name: Install dependencies | |
run: | | |
uv sync --dev | |
- name: Run ruff check | |
run: uv run ruff check . | |
- name: Run ruff format check | |
run: uv run ruff format --check . | |
- name: Run mypy | |
run: uv run mypy llm_canvas/ | |
- name: Setup Node.js for frontend linting | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "npm" | |
cache-dependency-path: web_ui/package-lock.json | |
- name: Install frontend dependencies | |
working-directory: web_ui | |
run: npm ci | |
- name: Check TypeScript types | |
working-directory: web_ui | |
run: npm run type-check | |
- name: Check Prettier formatting | |
working-directory: web_ui | |
run: npm run format:check | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "latest" | |
- name: Set up Python ${{ matrix.python-version }} | |
run: uv python install ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
uv sync --dev | |
- name: Run tests | |
run: uv run pytest | |
frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "npm" | |
cache-dependency-path: web_ui/package-lock.json | |
- name: Install frontend dependencies | |
working-directory: web_ui | |
run: npm ci | |
- name: Build frontend | |
working-directory: web_ui | |
run: npm run build | |
build: | |
runs-on: ubuntu-latest | |
needs: [lint-and-format, test, frontend] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "latest" | |
- name: Set up Python | |
run: uv python install 3.12 | |
- name: Install dependencies | |
run: uv sync --dev | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "npm" | |
cache-dependency-path: web_ui/package-lock.json | |
- name: Install frontend dependencies | |
working-directory: web_ui | |
run: npm ci | |
- name: Build frontend | |
working-directory: web_ui | |
run: npm run build | |
- name: Build package | |
run: | | |
uv build | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
retention-days: 7 |