Skip to content

Commit 0105107

Browse files
Setup local CI (#348)
1 parent e665d2d commit 0105107

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pipeline {
88
stage('Build') {
99
steps {
1010
withPythonEnv('System-CPython-3.10') {
11-
withEnv(['PIP_INDEX_URL=https://pypi.uwkm.nl/voxyan/testing/+simple/']) {
11+
withEnv(['PIP_INDEX_URL=https://pypi.uwkm.nl/voxyan/oscar/+simple/']) {
1212
pysh "make install"
1313
}
1414
}
@@ -24,7 +24,7 @@ pipeline {
2424
stage('Test') {
2525
steps {
2626
withPythonEnv('System-CPython-3.10') {
27-
pysh "make test"
27+
pysh "make coverage"
2828
}
2929
}
3030
post {

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ clean:
88
rm -Rf build/
99

1010
install:
11-
pip install -e .[dev]
11+
pip install -e .[dev] --upgrade --upgrade-strategy=eager --pre
1212

1313
sandbox: install
1414
python sandbox/manage.py migrate
@@ -43,15 +43,11 @@ publish_release_testpypi: build_release
4343
publish_release: build_release
4444
twine upload dist/*
4545

46-
lint.installed:
47-
pip install -e .[lint]
48-
touch $@
49-
50-
lint: lint.installed
46+
lint:
5147
black --check --exclude "migrations/*" oscarapi/
5248
pylint setup.py oscarapi/
5349

54-
black: lint.installed
50+
black:
5551
black --exclude "/migrations/" oscarapi/
5652

5753
uwsgi:

oscarapi/utils/models.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from contextlib import contextmanager
22

3-
try:
4-
from unittest.mock import patch
5-
except ImportError:
6-
from mock import patch
3+
from unittest.mock import patch
74

85

96
@contextmanager

setup.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,18 @@
5050
"setuptools",
5151
"django-oscar>=3.2",
5252
"Django>=3.2",
53-
"djangorestframework>=3.9"
53+
"djangorestframework>=3.9",
5454
],
5555
# mark test target to require extras.
5656
extras_require={
57-
"dev": ["coverage", "mock", "twine", "wheel", "easy_thumbnails"],
58-
"lint": ["pylint", "pylint-django", "black>=23.1.0"],
57+
"dev": [
58+
"coverage",
59+
"wheel",
60+
"easy_thumbnails",
61+
"vdt.versionplugin.wheel",
62+
"pylint",
63+
"pylint-django",
64+
"black>=23.1.0",
65+
],
5966
},
6067
)

0 commit comments

Comments
 (0)