Skip to content

Commit

Permalink
Merge facd97a into 8ffe6bd
Browse files Browse the repository at this point in the history
  • Loading branch information
baztian committed Jun 23, 2020
2 parents 8ffe6bd + facd97a commit bc1081a
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 12 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,31 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel --universal
twine upload dist/*
82 changes: 82 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,82 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6]
plattform: ["Python"]
include:
- python-version: 3.6
plattform: "Jython"
jython: org.python:jython-installer:2.7.2
toxenv: "jython-driver-{hsqldb,mock}"

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Maven cache
uses: actions/cache@v1
with:
path: .tox/shared/.m2
key: ${{ matrix.plattform }}-${{ matrix.python-version }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ matrix.plattform }}-${{ matrix.python-version }}-maven-
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ matrix.plattform }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/*requirements.txt', 'tox.ini', 'setup.py') }}
restore-keys: |
${{ matrix.plattform }}-${{ matrix.python-version }}-pip-
- name: Jython installation cache
uses: actions/cache@v2
with:
path: ~/jython
key: ${{ matrix.jython }}-jython
if: matrix.jython

- name: Consider Jython
run: |
ci/before_install_jython.sh
if: matrix.jython
env:
JYTHON: ${{ matrix.jython }}
- name: Install dependencies
# for some reason installing from https://github.com/baztian/tox-gh-actions/archive/allow-env-override.tar.gz doesn't work
run: pip install coveralls tox git+https://github.com/baztian/tox-gh-actions.git@allow-env-override
- name: Test with tox for Jython only
if: matrix.jython
run: tox -e "${{ matrix.toxenv }}"
- name: Test with tox for non Jython only
if: ${{ ! matrix.jython }}
run: tox
- name: Coveralls
uses: baztian/coveralls-python-action@new-merged-changes
with:
parallel: true
flag-name: ${{ matrix.plattform }}-${{ matrix.python-version }}
coverage-version: 4.5.4

coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: baztian/coveralls-python-action@new-merged-changes
with:
parallel-finished: true
File renamed without changes.
5 changes: 3 additions & 2 deletions README.rst
Expand Up @@ -2,8 +2,9 @@
JayDeBeApi - bridge from JDBC database drivers to Python DB-API
=================================================================

.. image:: https://img.shields.io/travis/baztian/jaydebeapi/master.svg
:target: https://travis-ci.org/baztian/jaydebeapi
.. image:: https://github.com/baztian/jaydebeapi/workflows/tests/badge.svg
:target: https://github.com/baztian/jaydebeapi/actions?query=workflow%3Atests
:alt: test status

.. image:: https://img.shields.io/coveralls/baztian/jaydebeapi/master.svg
:target: https://coveralls.io/r/baztian/jaydebeapi
Expand Down
4 changes: 0 additions & 4 deletions ci/before_install.sh

This file was deleted.

7 changes: 3 additions & 4 deletions ci/before_install_jython.sh
Expand Up @@ -3,9 +3,8 @@ set -e

INST_DIR=$HOME/jython/jython-${JYTHON##*:}
if [ ! -d "$INST_DIR" ]; then
JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON")
JYTHON_JAR=$(${PWD}/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/
pip install --upgrade virtualenv==15.1.0 tox==3.9.0
sudo ln -s "$INST_DIR"/bin/jython /usr/local/bin/
6 changes: 6 additions & 0 deletions sonar-project.properties
@@ -0,0 +1,6 @@
sonar.organization=baztian
sonar.projectKey=baztian_jaydebeapi

# relative paths to source directories. More details and properties are described
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
sonar.sources=.
8 changes: 6 additions & 2 deletions tox.ini
@@ -1,11 +1,15 @@
[tox]
envlist = py{27,3}-driver-{hsqldb,mock,sqliteXerial}-newjpype,py{27,3}-driver-{hsqldb,mock}-oldjpype,py27-driver-sqlitePy,jython-driver-{hsqldb,mock}
envlist = py{27,35,36,38}-driver-{hsqldb,mock,sqliteXerial}-newjpype,
py{27,35,36,38}-driver-{hsqldb,mock}-oldjpype,
py27-driver-sqlitePy,
jython-driver-{hsqldb,mock}

[travis]
[gh-actions]
python =
2.7: py27-driver-{hsqldb,mock,sqliteXerial,sqlitePy}-newjpype, py27-driver-{hsqldb,mock}-oldjpype
3.5: py35-driver-{hsqldb,mock,sqliteXerial}-newjpype
3.6: py36-driver-{hsqldb,mock,sqliteXerial}-newjpype, py36-driver-{hsqldb,mock}-oldjpype
3.8: py38-driver-{hsqldb,mock,sqliteXerial}-newjpype, py38-driver-{hsqldb,mock}-oldjpype

[testenv]
# usedevelop required to enable coveralls source code view.
Expand Down

0 comments on commit bc1081a

Please sign in to comment.