name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install pytest pytest-cov
- name: Run tests
run: |
pytest tests/ -v --cov=src --cov-report=term-missing
test-node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run linting
run: |
npm run lint || echo "Linting not configured yet"
- name: Run tests
run: |
npm test || echo "Tests not configured yet"