62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'npm'
|
|
cache-dependency-path: src/frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: src/frontend
|
|
run: npm ci
|
|
|
|
- name: Run lint
|
|
working-directory: src/frontend
|
|
run: npm run lint
|
|
|
|
- name: Run type check
|
|
working-directory: src/frontend
|
|
run: npx tsc --noEmit
|
|
|
|
- name: Build
|
|
working-directory: src/frontend
|
|
run: npm run build
|
|
|
|
python-checks:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.12"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install data pipeline dependencies
|
|
working-directory: src/data-pipeline
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Check syntax
|
|
working-directory: src/data-pipeline
|
|
run: python -m py_compile ingest_prices.py ingest_sec.py sector_rotation.py
|
|
|
|
- name: Import check
|
|
working-directory: src/data-pipeline
|
|
run: python -c "import ingest_prices; import ingest_sec; import sector_rotation"
|