From 325f0c0264b32880fed9e0fb0b7ed87e9bbf23ff Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 17 Jun 2020 21:47:19 +0200 Subject: [PATCH 01/27] Create python-package.yml --- .github/workflows/python-package.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..215a4b4 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,29 @@ +# 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: Python package + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [2.7, 3.5, 3.6] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install coveralls tox tox-gh-actions + - name: Test with tox + run: tox From 4c42522e3fbb2a59cd4269d40b02583b664d44d0 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 17 Jun 2020 21:49:44 +0200 Subject: [PATCH 02/27] Use https://github.com/ymyzk/tox-gh-actions --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ad29f3f..e6ed767 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = py{27,3}-driver-{hsqldb,mock,sqliteXerial}-newjpype,py{27,3}-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 From 509db87ec8cc0d7cc58789a75ae5dd7b38cd730d Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 17 Jun 2020 21:55:35 +0200 Subject: [PATCH 03/27] Make envlist compatible with tox-gh-actions --- .travis.yml => .travis.yml_disabled | 0 tox.ini | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) rename .travis.yml => .travis.yml_disabled (100%) diff --git a/.travis.yml b/.travis.yml_disabled similarity index 100% rename from .travis.yml rename to .travis.yml_disabled diff --git a/tox.ini b/tox.ini index e6ed767..dd68490 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,8 @@ [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} [gh-actions] python = From ab925619d6899a1f52a07bf9c3b099cafab17fe7 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 17 Jun 2020 22:47:47 +0200 Subject: [PATCH 04/27] Add Jython support --- .github/workflows/python-package.yml | 21 +++++++++++++++++++-- ci/before_install.sh | 4 ---- ci/before_install_jython.sh | 5 ++--- tox.ini | 1 + 4 files changed, 22 insertions(+), 9 deletions(-) delete mode 100755 ci/before_install.sh diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 215a4b4..a914ff3 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,6 +16,12 @@ jobs: 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 @@ -23,7 +29,18 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Consider Jython + run: | + ci/before_install_jython.sh + if: matrix.jython + env: + JYTHON: ${{ matrix.jython }} - name: Install dependencies - run: pip install coveralls tox tox-gh-actions - - name: Test with tox + # 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 diff --git a/ci/before_install.sh b/ci/before_install.sh deleted file mode 100755 index 1a99394..0000000 --- a/ci/before_install.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -e - -[ -n "$JYTHON" ] && "${TRAVIS_BUILD_DIR}/ci/before_install_jython.sh" || true diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index 5aa7f17..ae5a59f 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -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/ +sudo ln -s "$INST_DIR"/bin/jython /usr/local/bin/ diff --git a/tox.ini b/tox.ini index dd68490..48b5216 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,7 @@ 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. From c52e8c477362261f7cdddc000f65717c822f7ba5 Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 20:56:47 +0200 Subject: [PATCH 05/27] Run coveralls --- .github/workflows/python-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a914ff3..44e4bed 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -44,3 +44,5 @@ jobs: - name: Test with tox for non Jython only if: ${{ ! matrix.jython }} run: tox + - name: Run coveralls + run: coveralls From d908f1f7139fa25ca364d265ad038e2d1a58b1da Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 20:57:27 +0200 Subject: [PATCH 06/27] Use Coveralls action and remove redundant coverage install from jython setup file --- .github/workflows/python-package.yml | 6 ++++-- ci/before_install_jython.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 44e4bed..06d3ae7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -44,5 +44,7 @@ jobs: - name: Test with tox for non Jython only if: ${{ ! matrix.jython }} run: tox - - name: Run coveralls - run: coveralls + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index ae5a59f..c60e61c 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -6,5 +6,5 @@ if [ ! -d "$INST_DIR" ]; then 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 +pip install --upgrade virtualenv==15.1.0 tox==3.9.0 sudo ln -s "$INST_DIR"/bin/jython /usr/local/bin/ From 3cdc9016a81dfebec0489752e3438fd2b5520a0b Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 21:08:16 +0200 Subject: [PATCH 07/27] Fix Coveralls for parallel builds --- .github/workflows/python-package.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 06d3ae7..7fd6d20 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -10,7 +10,7 @@ on: branches: [ master ] jobs: - build: + test: runs-on: ubuntu-latest strategy: @@ -44,7 +44,19 @@ jobs: - name: Test with tox for non Jython only if: ${{ ! matrix.jython }} run: tox - - name: Coveralls + - name: Coveralls Parallel uses: coverallsapp/github-action@master with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.github_token }} + flag-name: run-${{ matrix.python-version }}-${{ matrix.plattform }} + parallel: true + + finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true From fa30746b3a2119135d44cbb3a7c95cf9e7f069c3 Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 21:16:25 +0200 Subject: [PATCH 08/27] Work around https://github.com/coverallsapp/github-action/issues/50 --- .github/workflows/python-package.yml | 5 ++++- README.rst | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7fd6d20..685b609 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -45,10 +45,13 @@ jobs: if: ${{ ! matrix.jython }} run: tox - name: Coveralls Parallel + env: + # required due to https://github.com/coverallsapp/github-action/issues/50 + COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}-${{ matrix.plattform }} uses: coverallsapp/github-action@master with: github-token: ${{ secrets.github_token }} - flag-name: run-${{ matrix.python-version }}-${{ matrix.plattform }} + # flag-name: run-${{ matrix.python-version }}-${{ matrix.plattform }} parallel: true finish: diff --git a/README.rst b/README.rst index 56d0eb7..ce7da21 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,8 @@ 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/CI/badge.svg + :target: https://github.com/baztian/jaydebeapi/actions .. image:: https://img.shields.io/coveralls/baztian/jaydebeapi/master.svg :target: https://coveralls.io/r/baztian/jaydebeapi From 6b42342a055f24b6146e2a0706ce0cfd70c4b3b7 Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 21:22:21 +0200 Subject: [PATCH 09/27] Add path to coverage file --- .github/workflows/python-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 685b609..610967e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -51,6 +51,7 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.github_token }} + path-to-lcov: .coverage # flag-name: run-${{ matrix.python-version }}-${{ matrix.plattform }} parallel: true From e660da8e2f777465f334a074588c310cbf25e1a5 Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 23:06:02 +0200 Subject: [PATCH 10/27] Drop coveralls support because of https://github.com/coverallsapp/github-action/issues/30 --- .github/workflows/python-package.yml | 22 +--------------------- README.rst | 3 --- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 610967e..a843f47 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -37,30 +37,10 @@ jobs: 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 + run: pip install 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 Parallel - env: - # required due to https://github.com/coverallsapp/github-action/issues/50 - COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}-${{ matrix.plattform }} - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - path-to-lcov: .coverage - # flag-name: run-${{ matrix.python-version }}-${{ matrix.plattform }} - parallel: true - - finish: - needs: test - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true diff --git a/README.rst b/README.rst index ce7da21..c324963 100644 --- a/README.rst +++ b/README.rst @@ -5,9 +5,6 @@ .. image:: https://github.com/baztian/jaydebeapi/workflows/CI/badge.svg :target: https://github.com/baztian/jaydebeapi/actions -.. image:: https://img.shields.io/coveralls/baztian/jaydebeapi/master.svg - :target: https://coveralls.io/r/baztian/jaydebeapi - .. image:: https://img.shields.io/badge/python-2.7,_3.5,_3.6-blue.svg :target: https://pypi.python.org/pypi/JayDeBeApi/ From af47f0701149331e3b27497070b8fedcecbb0967 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 17 Jun 2020 21:32:42 +0200 Subject: [PATCH 11/27] Add configuration for sonarcloud.io according to https://github.com/SonarSource/sonarcloud-github-action --- .github/workflows/python-package.yml | 5 +++++ sonar-project.properties | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 sonar-project.properties diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a843f47..8125e5a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -44,3 +44,8 @@ jobs: - name: Test with tox for non Jython only if: ${{ ! matrix.jython }} run: tox + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..99c81c0 --- /dev/null +++ b/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=. From b646d1b4d687094ffdde2c0bd290cb2498011e7e Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 23:23:27 +0200 Subject: [PATCH 12/27] Revert "Drop coveralls support because of https://github.com/coverallsapp/github-action/issues/30" This reverts commit e660da8e2f777465f334a074588c310cbf25e1a5. --- .github/workflows/python-package.yml | 25 ++++++++++++++++++++----- README.rst | 3 +++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 8125e5a..610967e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -37,15 +37,30 @@ jobs: 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 tox git+https://github.com/baztian/tox-gh-actions.git@allow-env-override + 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: SonarCloud Scan - uses: sonarsource/sonarcloud-github-action@master + - name: Coveralls Parallel env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + # required due to https://github.com/coverallsapp/github-action/issues/50 + COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}-${{ matrix.plattform }} + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + path-to-lcov: .coverage + # flag-name: run-${{ matrix.python-version }}-${{ matrix.plattform }} + parallel: true + + finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff --git a/README.rst b/README.rst index c324963..ce7da21 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,9 @@ .. image:: https://github.com/baztian/jaydebeapi/workflows/CI/badge.svg :target: https://github.com/baztian/jaydebeapi/actions +.. image:: https://img.shields.io/coveralls/baztian/jaydebeapi/master.svg + :target: https://coveralls.io/r/baztian/jaydebeapi + .. image:: https://img.shields.io/badge/python-2.7,_3.5,_3.6-blue.svg :target: https://pypi.python.org/pypi/JayDeBeApi/ From 4491c7f3f1b1466ff3248d4993ed4e875870a493 Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 23:27:10 +0200 Subject: [PATCH 13/27] Try to make coveralls working again. This time with https://github.com/marketplace/actions/coveralls-python --- .github/workflows/python-package.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 610967e..b3967bf 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -44,23 +44,16 @@ jobs: - name: Test with tox for non Jython only if: ${{ ! matrix.jython }} run: tox - - name: Coveralls Parallel - env: - # required due to https://github.com/coverallsapp/github-action/issues/50 - COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}-${{ matrix.plattform }} - uses: coverallsapp/github-action@master + - name: Coveralls + uses: AndreMiras/coveralls-python-action@v20200413 with: - github-token: ${{ secrets.github_token }} - path-to-lcov: .coverage - # flag-name: run-${{ matrix.python-version }}-${{ matrix.plattform }} parallel: true - finish: + coveralls_finish: needs: test runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: coverallsapp/github-action@master + uses: AndreMiras/coveralls-python-action@v20200413 with: - github-token: ${{ secrets.github_token }} parallel-finished: true From f33b1620679c4279f3866612ee2fe644554a92ea Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 19 Jun 2020 23:59:29 +0200 Subject: [PATCH 14/27] Try to specify coverage version --- .github/workflows/python-package.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b3967bf..31f9c43 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -45,15 +45,17 @@ jobs: if: ${{ ! matrix.jython }} run: tox - name: Coveralls - uses: AndreMiras/coveralls-python-action@v20200413 + uses: baztian/coveralls-python-action@supply-coverage-version with: parallel: true + coverage-version: 4.5.4 coveralls_finish: needs: test runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: AndreMiras/coveralls-python-action@v20200413 + uses: baztian/coveralls-python-action@supply-coverage-version with: parallel-finished: true + coverage-version: 4.5.4 From 55ef89e60649f893c82ebaf65faf080cbf293869 Mon Sep 17 00:00:00 2001 From: baztian Date: Sat, 20 Jun 2020 00:44:11 +0200 Subject: [PATCH 15/27] Provide .coveragerc as required by coveralls action --- .coveragerc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..e1c38e8 --- /dev/null +++ b/.coveragerc @@ -0,0 +1 @@ +relative_files = True From 0aa354fccbb79362d4299cc7dec6060bc3c60bd4 Mon Sep 17 00:00:00 2001 From: baztian Date: Sat, 20 Jun 2020 22:47:38 +0200 Subject: [PATCH 16/27] Remove .coveragerc as relative_files option is not available in coverage < 5 --- .coveragerc | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index e1c38e8..0000000 --- a/.coveragerc +++ /dev/null @@ -1 +0,0 @@ -relative_files = True From 53ba6959b99094e2eba282c285aa42f83e58ef60 Mon Sep 17 00:00:00 2001 From: baztian Date: Sun, 21 Jun 2020 00:40:37 +0200 Subject: [PATCH 17/27] Remove coverage-version attribute that is not required for parallel-finished --- .github/workflows/python-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 31f9c43..8fc6e89 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -58,4 +58,3 @@ jobs: uses: baztian/coveralls-python-action@supply-coverage-version with: parallel-finished: true - coverage-version: 4.5.4 From 95ef68ca000fcd44178809e272ba478242ab6a0f Mon Sep 17 00:00:00 2001 From: baztian Date: Sun, 21 Jun 2020 22:24:22 +0200 Subject: [PATCH 18/27] Specify job title for matrix build --- .github/workflows/python-package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 8fc6e89..805c396 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -45,9 +45,10 @@ jobs: if: ${{ ! matrix.jython }} run: tox - name: Coveralls - uses: baztian/coveralls-python-action@supply-coverage-version + uses: baztian/coveralls-python-action@merged-changes with: parallel: true + flag-name: ${{ matrix.plattform }}-${{ matrix.python-version }} coverage-version: 4.5.4 coveralls_finish: @@ -55,6 +56,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: baztian/coveralls-python-action@supply-coverage-version + uses: baztian/coveralls-python-action@merged-changes with: parallel-finished: true From fc0098beb7a308eb733329e19e5dd80b6e939a5f Mon Sep 17 00:00:00 2001 From: baztian Date: Sun, 21 Jun 2020 23:00:30 +0200 Subject: [PATCH 19/27] Revert "Specify job title for matrix build" This reverts commit 95ef68ca000fcd44178809e272ba478242ab6a0f. --- .github/workflows/python-package.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 805c396..8fc6e89 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -45,10 +45,9 @@ jobs: if: ${{ ! matrix.jython }} run: tox - name: Coveralls - uses: baztian/coveralls-python-action@merged-changes + uses: baztian/coveralls-python-action@supply-coverage-version with: parallel: true - flag-name: ${{ matrix.plattform }}-${{ matrix.python-version }} coverage-version: 4.5.4 coveralls_finish: @@ -56,6 +55,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: baztian/coveralls-python-action@merged-changes + uses: baztian/coveralls-python-action@supply-coverage-version with: parallel-finished: true From f6a233559b510b76be139b4ce5bcede1ba07dccb Mon Sep 17 00:00:00 2001 From: baztian Date: Sun, 21 Jun 2020 23:07:22 +0200 Subject: [PATCH 20/27] Rename github action workflow --- .github/workflows/{python-package.yml => tests.yml} | 2 +- README.rst | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) rename .github/workflows/{python-package.yml => tests.yml} (98%) diff --git a/.github/workflows/python-package.yml b/.github/workflows/tests.yml similarity index 98% rename from .github/workflows/python-package.yml rename to .github/workflows/tests.yml index 8fc6e89..7504765 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/tests.yml @@ -1,7 +1,7 @@ # 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: Python package +name: tests on: push: diff --git a/README.rst b/README.rst index ce7da21..0d676ef 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,9 @@ JayDeBeApi - bridge from JDBC database drivers to Python DB-API ================================================================= -.. image:: https://github.com/baztian/jaydebeapi/workflows/CI/badge.svg - :target: https://github.com/baztian/jaydebeapi/actions +.. 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 From 9b1fd6e7fe4d0bbfcdeb28e07f5bc85c60864165 Mon Sep 17 00:00:00 2001 From: baztian Date: Tue, 23 Jun 2020 22:37:03 +0200 Subject: [PATCH 21/27] Try again with a fixed coveralls approach for more reasonable job names --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7504765..a9f24f3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,9 +45,10 @@ jobs: if: ${{ ! matrix.jython }} run: tox - name: Coveralls - uses: baztian/coveralls-python-action@supply-coverage-version + uses: baztian/coveralls-python-action@merged-changes with: parallel: true + flag-name: ${{ matrix.plattform }}-${{ matrix.python-version }} coverage-version: 4.5.4 coveralls_finish: @@ -55,6 +56,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: baztian/coveralls-python-action@supply-coverage-version + uses: baztian/coveralls-python-action@merged-changes with: parallel-finished: true + flag-name: dummy From 88faae1546ed065ea54caa8c9cdb2c97311c185c Mon Sep 17 00:00:00 2001 From: baztian Date: Tue, 23 Jun 2020 22:57:28 +0200 Subject: [PATCH 22/27] Remove dummy flag not required anymore --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a9f24f3..43f7413 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -59,4 +59,3 @@ jobs: uses: baztian/coveralls-python-action@merged-changes with: parallel-finished: true - flag-name: dummy From bf5b01d41cdc4f7bb2fe984b2393ce1d41a4761f Mon Sep 17 00:00:00 2001 From: baztian Date: Tue, 23 Jun 2020 23:15:19 +0200 Subject: [PATCH 23/27] Upload Python Package (default github workflow) --- .github/workflows/publish.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4e1ef42 --- /dev/null +++ b/.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 + twine upload dist/* From f82206311f566cd5fa438f8df42f5cee6a41fae4 Mon Sep 17 00:00:00 2001 From: baztian Date: Tue, 23 Jun 2020 23:15:39 +0200 Subject: [PATCH 24/27] Upload universal wheel for Python 2 and 3 --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4e1ef42..7624aa1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,5 +27,5 @@ jobs: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - python setup.py sdist bdist_wheel + python setup.py sdist bdist_wheel --universal twine upload dist/* From 27ec0b12cc2a424fa2a293f05765166b7934bcf3 Mon Sep 17 00:00:00 2001 From: baztian Date: Tue, 23 Jun 2020 23:20:23 +0200 Subject: [PATCH 25/27] Try to fix gh actions issue not taking updated coveralls-python-action --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 43f7413..35fc50a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,7 +45,7 @@ jobs: if: ${{ ! matrix.jython }} run: tox - name: Coveralls - uses: baztian/coveralls-python-action@merged-changes + uses: baztian/coveralls-python-action@new-merged-changes with: parallel: true flag-name: ${{ matrix.plattform }}-${{ matrix.python-version }} @@ -56,6 +56,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: baztian/coveralls-python-action@merged-changes + uses: baztian/coveralls-python-action@new-merged-changes with: parallel-finished: true From 31e05f53eef4146102a509bafde47953013dce16 Mon Sep 17 00:00:00 2001 From: baztian Date: Tue, 23 Jun 2020 23:42:23 +0200 Subject: [PATCH 26/27] Add some caching --- .github/workflows/tests.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 35fc50a..729d0a4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,33 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - 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- + + - 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- + + - 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- + + - uses: actions/cache@v2 + with: + path: ~/jython + key: ${{ matrix.jython }}-jython + if: matrix.jython + - name: Consider Jython run: | ci/before_install_jython.sh From facd97a0e6d319b2ee7b7e4f0715acafd9a50c25 Mon Sep 17 00:00:00 2001 From: baztian Date: Tue, 23 Jun 2020 23:46:34 +0200 Subject: [PATCH 27/27] Give cache usages a proper name --- .github/workflows/tests.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 729d0a4..7ecf012 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,28 +29,22 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v1 + - 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- - - - 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- - - - uses: actions/cache@v2 + - 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- - - - uses: actions/cache@v2 + - name: Jython installation cache + uses: actions/cache@v2 with: path: ~/jython key: ${{ matrix.jython }}-jython