File tree 8 files changed +93
-63
lines changed 8 files changed +93
-63
lines changed Original file line number Diff line number Diff line change @@ -48,30 +48,26 @@ jobs:
48
48
run : cat Aptfile | sudo xargs apt-get install
49
49
50
50
- name : Install poetry
51
- uses : snok/install-poetry@v1
52
- with :
53
- version : 1.5.1
54
- virtualenvs-create : true
55
- virtualenvs-in-project : true
51
+ uses : snok/install-poetry@v1
52
+ with :
53
+ version : 1.5.1
54
+ virtualenvs-create : true
55
+ virtualenvs-in-project : true
56
56
57
57
- name : Set up Python
58
- uses : actions/setup-python@v2
58
+ uses : actions/setup-python@v4
59
59
with :
60
- python-version : " 3.9.1"
60
+ python-version : " 3.9.17"
61
+ cache : " poetry"
61
62
62
- - id : cache
63
- uses : actions/cache@v1
64
- with :
65
- path : ~/.cache/pip
66
- key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/test_reqirements.txt') }}
67
- restore-keys : |
68
- ${{ runner.os }}-pip-
63
+ - name : Poetry lock check
64
+ run : poetry lock --check
69
65
70
66
- name : Install dependencies
71
67
run : poetry install --no-interaction
72
68
73
69
- name : Lint
74
- run : pylint ./**/*.py
70
+ run : poetry run pylint ./**/*.py
75
71
76
72
# You must also add the Configure sysctl limits step, otherwise Opensearch will not be able to boot.
77
73
- name : Configure sysctl limits
91
87
export MEDIA_ROOT="$(mktemp -d)"
92
88
sudo mkdir /var/media
93
89
sudo chown -R $USER:$USER /var/media
94
- tox
90
+ poetry run tox
95
91
env :
96
92
DEBUG : ' False'
97
93
NODE_ENV : ' production'
Original file line number Diff line number Diff line change 1
1
[MASTER]
2
2
ignore =migrations,.git
3
3
load-plugins = pylint_django
4
+ django-settings-module = micromasters.settings
4
5
5
6
[BASIC]
6
7
# Allow django's urlpatterns, and our log preference
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ django-hijack = "2.1.10"
22
22
django-hijack-admin = " 2.1.10"
23
23
django-ipware = " 3.0.0"
24
24
django-redis = " 5.2.0"
25
- django-robots = " 4.0.0"
25
+ django-robots = " ~ 4.0.0"
26
26
django-role-permissions = " 2.2.0"
27
27
django-server-status = " 0.7.3"
28
28
django-storages = " 1.9.1"
@@ -32,8 +32,6 @@ edx-api-client = "1.2.0"
32
32
edx-opaque-keys = " 0.4"
33
33
opensearch-py = " 1.0.0"
34
34
opensearch-dsl = " 1.0.0"
35
-
36
- faker = " 0.9.1"
37
35
html5lib = " 0.999999999"
38
36
l18n = " 2021.3"
39
37
ipython = " 8.10.0"
@@ -42,19 +40,19 @@ jsonpatch = "1.16"
42
40
newrelic = " 6.0.1.155"
43
41
open-discussions-client = " 0.5.0"
44
42
phonenumbers = " 8.10.23"
45
- psycopg2 = " ^2.9.5 "
43
+ psycopg2 = " 2.8.6 "
46
44
pycountry = " 16.11.27.1"
47
45
python-dateutil = " 2.5.3"
48
46
sentry-sdk = " 1.1.0"
49
47
redis = " 3.5.3"
50
- requests = " 2.25.1"
48
+ requests = " ^ 2.25.1"
51
49
setuptools = " 67.6.1"
52
- six = " 1.14.0"
50
+ six = " ^ 1.14.0"
53
51
social-auth-app-django = " 3.1.0"
54
52
robohash = " 1.0"
55
53
static3 = " 0.5.1"
56
- urllib3 = " 1.26.5"
57
- uwsgi = " 2.0.18"
54
+ urllib3 = " ^ 1.26.5"
55
+ uwsgi = " ^ 2.0.18"
58
56
wagtail = " 2.12.5"
59
57
flaky = " 3.7.0"
60
58
pyOpenSSL = " ^23.1.1"
@@ -66,19 +64,43 @@ astroid= "2.4.2"
66
64
bpython = " ^0.24"
67
65
ddt = " ^1.6.0"
68
66
django-debug-toolbar = " ^3.2.4"
67
+ factory-boy = " ^2.8.1"
68
+ faker = " 0.9.1"
69
69
ipdb = " ^0.13.13"
70
70
nplusone = " ^0.8.1"
71
71
pdbpp = " ^0.10.3"
72
72
pip-tools = " ^7.1.0"
73
- pylint = " ^ 2.6.0"
74
- pylint-django = " ^2.4.4 "
75
- pylint-plugin-utils = " ^ 0.6"
73
+ pylint = " 2.6.0"
74
+ pylint-django = " 2.1.0 "
75
+ pylint-plugin-utils = " 0.6"
76
76
pytest = " 5.3.5"
77
77
pytest-cov = " ^4.1.0"
78
78
pytest-django = " ^3.8.0"
79
79
pytest-mock = " ^3.11.1"
80
80
semantic-version = " ^2.10.0"
81
- selenium = " 3.141.0"
81
+ selenium = " 3.141.0"
82
82
testfixtures = " 7.1.0"
83
83
tox = " 3.28.0"
84
- isort = " 4.3.21"
84
+ isort = " 4.3.21"
85
+
86
+ [tool .pytest .ini_options ]
87
+ addopts = '''
88
+ --cov .
89
+ --cov-report term
90
+ --cov-report html
91
+ --cov-report xml
92
+ --ds=micromasters.settings
93
+ --reuse-db'''
94
+ norecursedirs = [
95
+ " node_modules" ,
96
+ " .git" ,
97
+ " .tox" ,
98
+ " static" ,
99
+ " templates" ,
100
+ " .*" ,
101
+ " CVS" ,
102
+ " _darcs" ,
103
+ " {arch}" ,
104
+ " *.egg" ,
105
+ " selenium_tests" ,
106
+ ]
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
[tox]
2
2
envlist = py39
3
3
skipsdist = True
4
+ isolated_build = true
4
5
5
6
[testenv]
6
- sitepackages = True
7
- deps =
8
- -r{toxinidir}/requirements.txt
9
- -r{toxinidir}/test_requirements.txt
7
+ allowlist_externals = poetry
8
+ commands_pre =
9
+ poetry install
10
10
commands =
11
11
py.test {posargs}
12
12
{toxinidir}/scripts/test/detect_missing_migrations.sh
You can’t perform that action at this time.
0 commit comments