Merge branch 'ci-fixes'. Got Jython running again. Some issues fixed. Still no green pipeline
commit
42f07739a2
|
|
@ -19,3 +19,6 @@ target/
|
||||||
.coverage
|
.coverage
|
||||||
*.iml
|
*.iml
|
||||||
.idea/
|
.idea/
|
||||||
|
.settings/
|
||||||
|
.jython_cache/
|
||||||
|
.vscode/
|
||||||
|
|
|
||||||
14
.travis.yml
14
.travis.yml
|
|
@ -1,11 +1,10 @@
|
||||||
|
os: linux
|
||||||
|
dist: focal
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
# use container-based infrastructure
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: pypi
|
provider: pypi
|
||||||
user: cheffe
|
username: cheffe
|
||||||
password:
|
password:
|
||||||
secure: ZQsqnd4Ux3erP0xfLJefJ/90wcJX/L2SfYOZFPbAIwJaX3n9iXf7jOGaT5FzJxLH+c0RJ1varqX0WZo1v0YKRz05IiSCLfZIT3Ia/Cy4nOLLL4a6CFUqzTlO7V1xyKMtQKimWGF5AYTAWvLTPu7cdDeg1YPENrZBYZPvJ/yRiJ4=
|
secure: ZQsqnd4Ux3erP0xfLJefJ/90wcJX/L2SfYOZFPbAIwJaX3n9iXf7jOGaT5FzJxLH+c0RJ1varqX0WZo1v0YKRz05IiSCLfZIT3Ia/Cy4nOLLL4a6CFUqzTlO7V1xyKMtQKimWGF5AYTAWvLTPu7cdDeg1YPENrZBYZPvJ/yRiJ4=
|
||||||
distributions: "sdist bdist_wheel"
|
distributions: "sdist bdist_wheel"
|
||||||
|
|
@ -21,14 +20,15 @@ cache:
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- '2.7'
|
- '2.7'
|
||||||
- '3.4'
|
- '3.5'
|
||||||
- '3.6'
|
- '3.6'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
matrix:
|
|
||||||
|
jobs:
|
||||||
include:
|
include:
|
||||||
- python: 3.6
|
- 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:
|
before_install:
|
||||||
- ci/before_install.sh
|
- ci/before_install.sh
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
.. image:: https://img.shields.io/badge/python-2.7,_3.4,_3.6-blue.svg
|
.. image:: https://img.shields.io/badge/python-2.7,_3.4,_3.6-blue.svg
|
||||||
:target: https://pypi.python.org/pypi/JayDeBeApi/
|
: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/
|
:target: https://pypi.python.org/pypi/JayDeBeApi/
|
||||||
|
|
||||||
.. image:: https://img.shields.io/github/tag/baztian/jaydebeapi.svg
|
.. 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
|
$ 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_
|
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.
|
installations may cause problems.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,10 @@ Setup test requirements
|
||||||
pip install -rdev-requirements.txt
|
pip install -rdev-requirements.txt
|
||||||
|
|
||||||
# Install Jython 2.7
|
# Install Jython 2.7
|
||||||
ci/mvnget.sh org.python:jython-installer:2.7.0
|
ci/mvnget.sh org.python:jython-installer:2.7.2
|
||||||
java -jar jython-installer-2.7.0.jar && rm jython-installer-2.7.0.jar
|
java -jar jython-installer-2.7.2.jar && rm jython-installer-2.7.2.jar
|
||||||
# add jython to your path
|
# 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
|
# run tests for all supported envs
|
||||||
tox
|
tox
|
||||||
|
|
||||||
|
|
@ -72,4 +67,4 @@ Build a new release
|
||||||
|
|
||||||
9. Send new version and tags to github origin. ::
|
9. Send new version and tags to github origin. ::
|
||||||
|
|
||||||
$ git push origin master --follow-tags
|
$ git push --follow-tags && push --tags
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@ if [ ! -d "$INST_DIR" ]; then
|
||||||
JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON")
|
JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON")
|
||||||
java -jar ${JYTHON_JAR} -s -d "$INST_DIR"
|
java -jar ${JYTHON_JAR} -s -d "$INST_DIR"
|
||||||
fi
|
fi
|
||||||
|
pip install --upgrade virtualenv==15.1.0 tox==3.9.0 coverage==4.5.4
|
||||||
mkdir -p $HOME/bin
|
mkdir -p $HOME/bin
|
||||||
ln -s "$INST_DIR"/bin/jython $HOME/bin/
|
ln -s "$INST_DIR"/bin/jython $HOME/bin/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
tox==2.6.0
|
tox==3.9.0
|
||||||
wheel==0.29.0
|
virtualenv==15.1.0
|
||||||
|
wheel==0.34.2
|
||||||
bump2version==1.0.0
|
bump2version==1.0.0
|
||||||
twine==1.15.0
|
twine==1.15.0
|
||||||
|
|
|
||||||
|
|
@ -8,21 +8,21 @@
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-all</artifactId>
|
<artifactId>mockito-inline</artifactId>
|
||||||
<version>1.9.5</version>
|
<version>3.3.3</version>
|
||||||
<!-- non-test scope on purpose -->
|
<!-- non-test scope on purpose -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.11</version>
|
<version>4.13</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<version>2.10</version>
|
<version>3.1.2</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>copy-dependencies</id>
|
<id>copy-dependencies</id>
|
||||||
|
|
@ -52,13 +52,12 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.1.2</version>
|
<version>3.2.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<addClasspath>true</addClasspath>
|
<addClasspath>true</addClasspath>
|
||||||
<classpathPrefix>lib/</classpathPrefix>
|
<classpathPrefix>lib/</classpathPrefix>
|
||||||
<!-- <mainClass>theMainClass</mainClass> -->
|
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class MockTest(unittest.TestCase):
|
||||||
cursor = self.conn.cursor()
|
cursor = self.conn.cursor()
|
||||||
try:
|
try:
|
||||||
cursor.execute("dummy stmt")
|
cursor.execute("dummy stmt")
|
||||||
fail("expected exception")
|
self.fail("expected exception")
|
||||||
except jaydebeapi.DatabaseError as e:
|
except jaydebeapi.DatabaseError as e:
|
||||||
self.assertEquals(str(e), "java.sql.SQLException: expected")
|
self.assertEquals(str(e), "java.sql.SQLException: expected")
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ class MockTest(unittest.TestCase):
|
||||||
cursor = self.conn.cursor()
|
cursor = self.conn.cursor()
|
||||||
try:
|
try:
|
||||||
cursor.execute("dummy stmt")
|
cursor.execute("dummy stmt")
|
||||||
fail("expected exception")
|
self.fail("expected exception")
|
||||||
except jaydebeapi.InterfaceError as e:
|
except jaydebeapi.InterfaceError as e:
|
||||||
self.assertEquals(str(e), "java.lang.RuntimeException: expected")
|
self.assertEquals(str(e), "java.lang.RuntimeException: expected")
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ class MockTest(unittest.TestCase):
|
||||||
self.conn.jconn.mockExceptionOnCommit("java.sql.SQLException", "expected")
|
self.conn.jconn.mockExceptionOnCommit("java.sql.SQLException", "expected")
|
||||||
try:
|
try:
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
fail("expected exception")
|
self.fail("expected exception")
|
||||||
except jaydebeapi.DatabaseError as e:
|
except jaydebeapi.DatabaseError as e:
|
||||||
self.assertEquals(str(e), "java.sql.SQLException: expected")
|
self.assertEquals(str(e), "java.sql.SQLException: expected")
|
||||||
|
|
||||||
|
|
@ -87,7 +87,7 @@ class MockTest(unittest.TestCase):
|
||||||
self.conn.jconn.mockExceptionOnCommit("java.lang.RuntimeException", "expected")
|
self.conn.jconn.mockExceptionOnCommit("java.lang.RuntimeException", "expected")
|
||||||
try:
|
try:
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
fail("expected exception")
|
self.fail("expected exception")
|
||||||
except jaydebeapi.InterfaceError as e:
|
except jaydebeapi.InterfaceError as e:
|
||||||
self.assertEquals(str(e), "java.lang.RuntimeException: expected")
|
self.assertEquals(str(e), "java.lang.RuntimeException: expected")
|
||||||
|
|
||||||
|
|
@ -95,7 +95,7 @@ class MockTest(unittest.TestCase):
|
||||||
self.conn.jconn.mockExceptionOnRollback("java.sql.SQLException", "expected")
|
self.conn.jconn.mockExceptionOnRollback("java.sql.SQLException", "expected")
|
||||||
try:
|
try:
|
||||||
self.conn.rollback()
|
self.conn.rollback()
|
||||||
fail("expected exception")
|
self.fail("expected exception")
|
||||||
except jaydebeapi.DatabaseError as e:
|
except jaydebeapi.DatabaseError as e:
|
||||||
self.assertEquals(str(e), "java.sql.SQLException: expected")
|
self.assertEquals(str(e), "java.sql.SQLException: expected")
|
||||||
|
|
||||||
|
|
@ -103,6 +103,6 @@ class MockTest(unittest.TestCase):
|
||||||
self.conn.jconn.mockExceptionOnRollback("java.lang.RuntimeException", "expected")
|
self.conn.jconn.mockExceptionOnRollback("java.lang.RuntimeException", "expected")
|
||||||
try:
|
try:
|
||||||
self.conn.rollback()
|
self.conn.rollback()
|
||||||
fail("expected exception")
|
self.fail("expected exception")
|
||||||
except jaydebeapi.InterfaceError as e:
|
except jaydebeapi.InterfaceError as e:
|
||||||
self.assertEquals(str(e), "java.lang.RuntimeException: expected")
|
self.assertEquals(str(e), "java.lang.RuntimeException: expected")
|
||||||
|
|
|
||||||
12
tox.ini
12
tox.ini
|
|
@ -4,7 +4,7 @@ envlist = py{27,3}-driver-{hsqldb,mock,sqliteXerial}-newjpype,py{27,3}-driver-{h
|
||||||
[travis]
|
[travis]
|
||||||
python =
|
python =
|
||||||
2.7: py27-driver-{hsqldb,mock,sqliteXerial,sqlitePy}-newjpype, py27-driver-{hsqldb,mock}-oldjpype
|
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
|
3.6: py36-driver-{hsqldb,mock,sqliteXerial}-newjpype, py36-driver-{hsqldb,mock}-oldjpype
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
|
@ -19,11 +19,11 @@ setenv =
|
||||||
driver-sqlitePy: TESTNAME=test_integration.SqlitePyTest
|
driver-sqlitePy: TESTNAME=test_integration.SqlitePyTest
|
||||||
deps =
|
deps =
|
||||||
oldjpype: JPype1==0.6.3
|
oldjpype: JPype1==0.6.3
|
||||||
newjpype: JPype1==0.7.4
|
py35-newjpype: JPype1==0.7.5
|
||||||
# https://github.com/jiptool/jip/issues/54
|
py36-newjpype: JPype1==0.7.5
|
||||||
#jip==0.9.14
|
py27-newjpype: JPype1==0.7.0
|
||||||
https://github.com/jiptool/jip/archive/0.9.14.tar.gz
|
jip==0.9.14
|
||||||
coverage
|
coverage==4.5.4
|
||||||
commands =
|
commands =
|
||||||
python --version
|
python --version
|
||||||
python ci/jipconf_subst.py {envdir} {toxworkdir}/shared
|
python ci/jipconf_subst.py {envdir} {toxworkdir}/shared
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue