LINT: linted #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pyitab | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-min.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
sudo apt-get install swig build-essential gfortran python3-dev python-tk | |
- name: Install dependencies with pip | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U numpy blosc | |
pip install cython wheel | |
pip install flake8 pytest pytest-cov | |
pip install tk cytoolz | |
- name: Install package requirements.txt | |
run: | | |
if [ -f requirements-min.txt ]; then pip install -r requirements-min.txt; fi | |
python setup.py develop | |
- name: Lint with flake8 | |
run: | | |
# 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 --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
run: | | |
python -m pytest --pyargs pyitab --cov=pyitab | |
- uses: codecov/codecov-action@v1 | |
if: success() | |
name: 'Upload coverage to CodeCov' |