nobbynobbs/aiohttp-aiocache

View on GitHub
.github/workflows/pythonapp.yml

Summary

Maintainability
Test Coverage
name: code-quality
on: [push]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Set up Python
        uses: actions/setup-python@v1
        with:
          python-version: 3.7
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install poetry
          make install
      - name: Lint with flake8
        run: |
          make lint
      - name: Check typing with mypy
        run: |
          make mypy

  test:
    runs-on: ${{ matrix.os }}
    needs: [lint]
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: ["3.6", "3.7", "3.8"]
    steps:
    - uses: actions/checkout@v1
    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install poetry
        make install
    - name: Test with pytest
      run: |
        make tests

  coverage:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: 3.7
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install poetry
        make install
    - name: Test & publish code coverage
      uses: paambaati/codeclimate-action@v2.3.0
      env:
        CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
      with:
        coverageCommand: make tests-cov-report