Merge branch 'ci-fixes'. Got Jython running again. Some issues fixed. Still no green pipeline

master
baztian 2020-05-27 21:05:11 +02:00
commit 42f07739a2
9 changed files with 40 additions and 40 deletions

3
.gitignore vendored
View File

@ -19,3 +19,6 @@ target/
.coverage
*.iml
.idea/
.settings/
.jython_cache/
.vscode/

View File

@ -1,11 +1,10 @@
os: linux
dist: focal
language: python
# use container-based infrastructure
sudo: false
deploy:
provider: pypi
user: cheffe
username: cheffe
password:
secure: ZQsqnd4Ux3erP0xfLJefJ/90wcJX/L2SfYOZFPbAIwJaX3n9iXf7jOGaT5FzJxLH+c0RJ1varqX0WZo1v0YKRz05IiSCLfZIT3Ia/Cy4nOLLL4a6CFUqzTlO7V1xyKMtQKimWGF5AYTAWvLTPu7cdDeg1YPENrZBYZPvJ/yRiJ4=
distributions: "sdist bdist_wheel"
@ -21,14 +20,15 @@ cache:
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
env:
matrix:
jobs:
include:
- python: 3.6
env: JYTHON=org.python:jython-installer:2.7.0 TOXENV="jython-driver-{hsqldb,mock}"
env: JYTHON=org.python:jython-installer:2.7.2 TOXENV="jython-driver-{hsqldb,mock}"
before_install:
- ci/before_install.sh

View File

@ -11,7 +11,7 @@
.. image:: https://img.shields.io/badge/python-2.7,_3.4,_3.6-blue.svg
:target: https://pypi.python.org/pypi/JayDeBeApi/
.. image:: https://img.shields.io/badge/jython-2.7.0-blue.svg
.. image:: https://img.shields.io/badge/jython-2.7.2-blue.svg
:target: https://pypi.python.org/pypi/JayDeBeApi/
.. image:: https://img.shields.io/github/tag/baztian/jaydebeapi.svg
@ -58,10 +58,11 @@ or if you are using Jython use ::
$ jython setup.py install
It has been tested with Jython 2.7.0.
It has been tested with Jython 2.7.2.
If you are using cPython ensure that you have installed JPype_
properly. It has been tested with JPype1 0.5.7. Older JPype
properly. It has been tested with JPype1 0.6.3 and 0.7.5 for Python 3 and
with JPype1 0.6.3 and 0.7.0 for Python 2.7. Older JPype
installations may cause problems.
Usage

View File

@ -19,15 +19,10 @@ Setup test requirements
pip install -rdev-requirements.txt
# Install Jython 2.7
ci/mvnget.sh org.python:jython-installer:2.7.0
java -jar jython-installer-2.7.0.jar && rm jython-installer-2.7.0.jar
ci/mvnget.sh org.python:jython-installer:2.7.2
java -jar jython-installer-2.7.2.jar && rm jython-installer-2.7.2.jar
# add jython to your path
# Install Python 2.6
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python2.6 python2.6-dev
# run tests for all supported envs
tox
@ -72,4 +67,4 @@ Build a new release
9. Send new version and tags to github origin. ::
$ git push origin master --follow-tags
$ git push --follow-tags && push --tags

View File

@ -6,5 +6,6 @@ if [ ! -d "$INST_DIR" ]; then
JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON")
java -jar ${JYTHON_JAR} -s -d "$INST_DIR"
fi
pip install --upgrade virtualenv==15.1.0 tox==3.9.0 coverage==4.5.4
mkdir -p $HOME/bin
ln -s "$INST_DIR"/bin/jython $HOME/bin/

View File

@ -1,4 +1,5 @@
tox==2.6.0
wheel==0.29.0
tox==3.9.0
virtualenv==15.1.0
wheel==0.34.2
bump2version==1.0.0
twine==1.15.0

View File

@ -8,21 +8,21 @@
<packaging>jar</packaging>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<artifactId>mockito-inline</artifactId>
<version>3.3.3</version>
<!-- non-test scope on purpose -->
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.13</version>
<scope>test</scope>
</dependency>
</dependencies>
@ -32,7 +32,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<version>3.1.2</version>
<executions>
<execution>
<id>copy-dependencies</id>
@ -52,13 +52,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<!-- <mainClass>theMainClass</mainClass> -->
</manifest>
</archive>
</configuration>

View File

@ -62,7 +62,7 @@ class MockTest(unittest.TestCase):
cursor = self.conn.cursor()
try:
cursor.execute("dummy stmt")
fail("expected exception")
self.fail("expected exception")
except jaydebeapi.DatabaseError as e:
self.assertEquals(str(e), "java.sql.SQLException: expected")
@ -71,7 +71,7 @@ class MockTest(unittest.TestCase):
cursor = self.conn.cursor()
try:
cursor.execute("dummy stmt")
fail("expected exception")
self.fail("expected exception")
except jaydebeapi.InterfaceError as e:
self.assertEquals(str(e), "java.lang.RuntimeException: expected")
@ -79,7 +79,7 @@ class MockTest(unittest.TestCase):
self.conn.jconn.mockExceptionOnCommit("java.sql.SQLException", "expected")
try:
self.conn.commit()
fail("expected exception")
self.fail("expected exception")
except jaydebeapi.DatabaseError as e:
self.assertEquals(str(e), "java.sql.SQLException: expected")
@ -87,7 +87,7 @@ class MockTest(unittest.TestCase):
self.conn.jconn.mockExceptionOnCommit("java.lang.RuntimeException", "expected")
try:
self.conn.commit()
fail("expected exception")
self.fail("expected exception")
except jaydebeapi.InterfaceError as e:
self.assertEquals(str(e), "java.lang.RuntimeException: expected")
@ -95,7 +95,7 @@ class MockTest(unittest.TestCase):
self.conn.jconn.mockExceptionOnRollback("java.sql.SQLException", "expected")
try:
self.conn.rollback()
fail("expected exception")
self.fail("expected exception")
except jaydebeapi.DatabaseError as e:
self.assertEquals(str(e), "java.sql.SQLException: expected")
@ -103,6 +103,6 @@ class MockTest(unittest.TestCase):
self.conn.jconn.mockExceptionOnRollback("java.lang.RuntimeException", "expected")
try:
self.conn.rollback()
fail("expected exception")
self.fail("expected exception")
except jaydebeapi.InterfaceError as e:
self.assertEquals(str(e), "java.lang.RuntimeException: expected")

12
tox.ini
View File

@ -4,7 +4,7 @@ envlist = py{27,3}-driver-{hsqldb,mock,sqliteXerial}-newjpype,py{27,3}-driver-{h
[travis]
python =
2.7: py27-driver-{hsqldb,mock,sqliteXerial,sqlitePy}-newjpype, py27-driver-{hsqldb,mock}-oldjpype
3.4: py34-driver-{hsqldb,mock,sqliteXerial}-newjpype
3.5: py35-driver-{hsqldb,mock,sqliteXerial}-newjpype
3.6: py36-driver-{hsqldb,mock,sqliteXerial}-newjpype, py36-driver-{hsqldb,mock}-oldjpype
[testenv]
@ -19,11 +19,11 @@ setenv =
driver-sqlitePy: TESTNAME=test_integration.SqlitePyTest
deps =
oldjpype: JPype1==0.6.3
newjpype: JPype1==0.7.4
# https://github.com/jiptool/jip/issues/54
#jip==0.9.14
https://github.com/jiptool/jip/archive/0.9.14.tar.gz
coverage
py35-newjpype: JPype1==0.7.5
py36-newjpype: JPype1==0.7.5
py27-newjpype: JPype1==0.7.0
jip==0.9.14
coverage==4.5.4
commands =
python --version
python ci/jipconf_subst.py {envdir} {toxworkdir}/shared