Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkinsfile #348

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
],
},
)
Loading