getindata/kedro-airflow-k8s

View on GitHub
.github/workflows/python-package.yml

Summary

Maintainability
Test Coverage
name: Tests

on:
  push:
    branches: 
      - master
      - develop
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    
    - name: Setup python
      uses: actions/setup-python@v2.2.1
      with:
        python-version: 3.7

    - name: Setup virtualenv
      run: |
        python -V
        python -m pip install virtualenv pipdeptree
        virtualenv venv
        source venv/bin/activate
        pip install --upgrade pip
   
    - name: Check pre-commit status
      run: |
        pip install .[mlflow,tests]
        pip freeze
        pipdeptree
        pre-commit run --all-files

    - name: Test with tox
      run: |
        airflow db reset --yes
        tox -e py37

    - name: Report coverage
      uses: paambaati/codeclimate-action@v2.7.5
      env:
        CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
      with:
        coverageCommand: coverage xml
        debug: true
        coverageLocations: coverage.xml:coverage.py