-
Notifications
You must be signed in to change notification settings - Fork 7
87 lines (85 loc) · 2.41 KB
/
tests.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
# copied from django-cte
name: localized_recurrence tests
on:
push:
branches: [master]
pull_request:
branches: [master,develop]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ['3.7', '3.8', '3.9']
# Time to switch to pytest or nose2?
# nosetests is broken on 3.10
# AttributeError: module 'collections' has no attribute 'Callable'
# https://github.com/nose-devs/nose/issues/1099
django:
- 'Django~=3.2.0'
- 'Django~=4.0.0'
- 'Django~=4.1.0'
- 'Django~=4.2.0'
psycopg:
- 'psycopg2==2.9.6'
- 'psycopg==3.1.10'
experimental: [false]
exclude:
- python: '3.7'
django: 'Django~=4.0.0'
- python: '3.7'
django: 'Django~=4.1.0'
- python: '3.7'
django: 'Django~=4.2.0'
- psycopg: 'psycopg==3.1.10'
django: 'Django~=3.2.0'
- psycopg: 'psycopg==3.1.10'
django: 'Django~=4.0.0'
- psycopg: 'psycopg==3.1.10'
django: 'Django~=4.1.0'
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Setup
run: |
python --version
pip install --upgrade pip wheel setuptools
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-testing.txt
pip install "${{ matrix.django }}"
pip install "${{ matrix.psycopg }}"
pip freeze
- name: Run tests
env:
DB_SETTINGS: >-
{
"ENGINE":"django.db.backends.postgresql",
"NAME":"localized_recurrence",
"USER":"postgres",
"PASSWORD":"postgres",
"HOST":"localhost",
"PORT":"5432"
}
run: |
coverage run manage.py test localized_recurrence
coverage report --fail-under=100
continue-on-error: ${{ matrix.experimental }}
- name: Check style
run: flake8 localized_recurrence