Skip to content

chore

chore #198

Workflow file for this run

name: Unit Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
- name: Check code style
run: |
pre-commit run --all-files
test_django:
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
node-version: [18.x, 20.x]
django-version: [3.2, 4.2]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Django ${{ matrix.django-version }}
run: |
pip install --upgrade pip
pip install Django==${{ matrix.django-version }}
- name: Install dependencies
run: |
pip install .
pip install -r tests/requirements/django.txt
- name: PYTHONPATH
run: |
echo "PYTHONPATH=${PWD}" >> $GITHUB_ENV
- name: Test with pytest
run: |
pytest tests/tests_django
test_flask:
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
node-version: [18.x, 20.x]
flask-version: [1.1.4, 2.2.2, 3.0.0]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Flask ${{ matrix.flask-version }}
run: |
pip install --upgrade pip
pip install Flask==${{ matrix.flask-version }}
- name: Install dependencies
run: |
pip install .
pip install -r tests/requirements/flask.txt
- name: PYTHONPATH
run: |
echo "PYTHONPATH=${PWD}" >> $GITHUB_ENV
- name: Test with pytest
run: |
pytest tests/tests_flask