poipoii/py-googletrans

View on GitHub
.github/workflows/workflow.yml

Summary

Maintainability
Test Coverage
name: Python package

on:
  push:
    branches:
    - dev

jobs:
  test:
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        python-version: [2.7, 3.6, 3.7, 3.8]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
    - name: Lint with flake8
      if: matrix.python-version == 3.7
      run: |
        pip install flake8
        # The GitHub editor is 127 chars wide
        flake8 . --exit-zero --count --config=.flake8  --max-line-length=127 --statistics
    - name: Test with pytest
      run: |
        pip install pytest pytest-cov
        py.test --cov googletrans