-
-
Notifications
You must be signed in to change notification settings - Fork 20
89 lines (84 loc) · 2.55 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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