blob: 2c59761d2aab35ec5ead026873b9133c22828a9f [file] [log] [blame]
name: Python Checks
on:
schedule:
- cron: '0 0 * * *'
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
jobs:
tests:
name: python tests on ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
os: ['macOS-latest', 'ubuntu-latest']
python-version: ['3.6', '3.7', '3.8']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build
run: mvn clean install -DskipTests
- name: Install python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: flink-ml-python/dev
run: python -m pip install -r dev-requirements.txt
- name: Check code style
working-directory: flink-ml-python
run: python -m flake8 --config=setup.cfg
- name: Check type annotations
working-directory: flink-ml-python
run: python -m mypy --config=setup.cfg
- name: Test the source code
working-directory: flink-ml-python
run: |
pytest pyflink/ml
pytest pyflink/examples