Skip to content

update

update #40

Workflow file for this run

# 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, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
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: |
python -m pip install --upgrade pip
# install packages to setup the environment
if [ -f environment.txt ]; then pip install -r environment.txt; fi
# install packages to setup the test environment
if [ -f test-environment.txt ]; then pip install -r test-environment.txt; fi
working-directory: runtime
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --count --select=E901,E999,F821,F822,F823,F401,F405 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
python -m flake8 . --count --exit-zero --max-line-length=100 --statistics
working-directory: runtime
- name: Test with pytest
run: |
python -m pytest --cache-clear --cov=databricks --cov-report=xml tests/
working-directory: runtime
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
directory: runtime
env_vars: OS,PYTHON
fail_ci_if_error: false
flags: unittests
name: codecov-umbrella
verbose: true