Skip to content

Commit

Permalink
Setup local CI (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
specialunderwear authored May 16, 2024
1 parent e665d2d commit 0105107
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline {
stage('Build') {
steps {
withPythonEnv('System-CPython-3.10') {
withEnv(['PIP_INDEX_URL=https://pypi.uwkm.nl/voxyan/testing/+simple/']) {
withEnv(['PIP_INDEX_URL=https://pypi.uwkm.nl/voxyan/oscar/+simple/']) {
pysh "make install"
}
}
Expand All @@ -24,7 +24,7 @@ pipeline {
stage('Test') {
steps {
withPythonEnv('System-CPython-3.10') {
pysh "make test"
pysh "make coverage"
}
}
post {
Expand Down
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ clean:
rm -Rf build/

install:
pip install -e .[dev]
pip install -e .[dev] --upgrade --upgrade-strategy=eager --pre

sandbox: install
python sandbox/manage.py migrate
Expand Down Expand Up @@ -43,15 +43,11 @@ publish_release_testpypi: build_release
publish_release: build_release
twine upload dist/*

lint.installed:
pip install -e .[lint]
touch $@

lint: lint.installed
lint:
black --check --exclude "migrations/*" oscarapi/
pylint setup.py oscarapi/

black: lint.installed
black:
black --exclude "/migrations/" oscarapi/

uwsgi:
Expand Down
5 changes: 1 addition & 4 deletions oscarapi/utils/models.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from contextlib import contextmanager

try:
from unittest.mock import patch
except ImportError:
from mock import patch
from unittest.mock import patch


@contextmanager
Expand Down
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,18 @@
"setuptools",
"django-oscar>=3.2",
"Django>=3.2",
"djangorestframework>=3.9"
"djangorestframework>=3.9",
],
# mark test target to require extras.
extras_require={
"dev": ["coverage", "mock", "twine", "wheel", "easy_thumbnails"],
"lint": ["pylint", "pylint-django", "black>=23.1.0"],
"dev": [
"coverage",
"wheel",
"easy_thumbnails",
"vdt.versionplugin.wheel",
"pylint",
"pylint-django",
"black>=23.1.0",
],
},
)

0 comments on commit 0105107

Please sign in to comment.