jaydebeapi/.github/workflows/python-package.yml

51 lines
1.6 KiB
YAML

# 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]
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: 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: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}