upgrade Python/uv dependencies #132
Workflow file for this run
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: PR Checks | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
jobs: | |
backend-test: | |
# skip this check for closed PRs that are not merged | |
if: ${{ github.event.action != 'closed' || github.event.pull_request.merged == true }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: backend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "backend/uv.lock" | |
# Install a specific version of uv. | |
version: "0.7.13" | |
- name: Set up Python | |
run: uv python install | |
- name: Sync dependencies | |
run: uv sync --dev | |
- name: Run formatter checks | |
run: uv run ruff format --check | |
- name: Run lint checks | |
run: uv run ruff check | |
- name: Run type checks | |
run: uv run ty check | |
- name: Run tests | |
env: | |
OPENAI_API_KEY: XXXX | |
PERSISTENT_STORAGE_DIR: /tmp/tenantfirstaid_data | |
run: uv run pytest -v -s | |
frontend-build: | |
# skip this check for closed PRs that are not merged | |
if: ${{ github.event.action != 'closed' || github.event.pull_request.merged == true }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: frontend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
cache-dependency-path: frontend/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linting checks | |
run: npm run lint | |
- name: Run format checks | |
run: npx prettier --check . | |
- name: Build frontend | |
run: npm run build |