Skip to content

feat: add test workflows + cli tests #1

feat: add test workflows + cli tests

feat: add test workflows + cli tests #1

Workflow file for this run

name: CI Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
frontend:
name: Frontend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: ./frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint check
run: npm run lint
- name: Type check
run: npx tsc --noEmit
# Skip actual test running since no test command is defined yet
- name: Build check
run: npm run build
backend:
name: Backend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
strategy:
matrix:
python-version: [3.11, 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install -e .
- name: Test with pytest
run: |
python -m pytest tests/ --cov=pyspur
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
file: .coverage
flags: backend