-
Notifications
You must be signed in to change notification settings - Fork 9
49 lines (40 loc) · 1.35 KB
/
django5.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
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
name: django5
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
django5:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
pip install -r tests/django5.txt
- name: flake8
run: |
flake8 --count --show-source --statistics --max-line-length=120 django_admin_geomap
flake8 --count --show-source --statistics --max-line-length=120 tests/test
- name: pylint
run: |
python -m pylint django_admin_geomap
python -m pylint tests/test
- name: pytest
run: |
python manage.py collectstatic --noinput --settings example.settings
python manage.py makemigrations --settings example.settings example
python manage.py migrate --settings example.settings
pytest -c pytest5.ini --cov=django_admin_geomap --cov-report xml --cov-report term:skip-covered --durations=5 tests