generated from nhcarrigan/template
81 lines
1.8 KiB
YAML
81 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
dependency-pin-check-typescript:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Copy TypeScript files to root
|
|
run: |
|
|
cp typescript/package.json .
|
|
cp typescript/package-lock.json . 2>/dev/null || true
|
|
cp typescript/pnpm-lock.yaml . 2>/dev/null || true
|
|
- uses: naomi-lgbt/dependency-pin-check@main
|
|
|
|
dependency-pin-check-python:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Copy Python files to root
|
|
run: |
|
|
cp python/requirements.txt .
|
|
cp python/pyproject.toml .
|
|
- uses: naomi-lgbt/dependency-pin-check@main
|
|
|
|
typescript:
|
|
needs: dependency-pin-check-typescript
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.15.0
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
cache: 'pnpm'
|
|
cache-dependency-path: typescript/pnpm-lock.yaml
|
|
|
|
- name: Install dependencies
|
|
run: make install-ts
|
|
|
|
- name: Run ESLint
|
|
run: make lint-ts
|
|
|
|
- name: Build TypeScript
|
|
run: make build
|
|
|
|
- name: Run tests
|
|
run: make test
|
|
|
|
python:
|
|
needs: dependency-pin-check-python
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Install dependencies
|
|
run: make install-py
|
|
|
|
- name: Run Ruff linter
|
|
run: make lint-py
|
|
|
|
- name: Check Ruff formatting
|
|
run: make format-check-py |