Files
Jyotisha/.github/workflows/test.yml
T
2026-06-24 15:22:54 +08:00

47 lines
1.4 KiB
YAML

name: Jyotish Skill Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: jyotish-app/package-lock.json
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt -r requirements-dev.txt
npm ci --prefix jyotish-app
- name: Print environment diagnostics
run: |
python --version
node --version
npm --version
npm --prefix jyotish-app exec -- vite --version
test -x jyotish-app/node_modules/.bin/vite
- name: Run pytest suite
run: |
mkdir -p artifacts
python -m pytest -vv --maxfail=1 --junitxml=artifacts/pytest.xml 2>&1 | tee artifacts/pytest.log
- name: Upload pytest diagnostics
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-diagnostics
path: artifacts/
- name: Run legacy runner
run: python tests/run_all.py
- name: Build frontend
run: npm run build --prefix jyotish-app