Skip to content

Merge pull request #34 from ewanbarr/main #86

Merge pull request #34 from ewanbarr/main

Merge pull request #34 from ewanbarr/main #86

Workflow file for this run

name: GitHub CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9']
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 it
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -e .[tests]
- name: Lint with flake8
run: |
pip install flake8 wemake-python-styleguide
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --statistics
- name: Run pytest and Generate coverage report
run: |
pip install pytest pytest-cov
pytest --cov=./ --cov-report=xml
continue-on-error: false
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: true