p2pfs/.github/workflows/main.yml

41 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2019-10-22 02:46:24 +00:00
name: build
on: [push]
jobs:
build:
strategy:
matrix:
2020-11-21 17:56:31 +00:00
os: [ubuntu-latest, macOS-latest]
2020-10-14 18:09:52 +00:00
python-version: [3.8]
2019-10-22 02:46:24 +00:00
runs-on: ${{ matrix.os }}
env:
# TODO: remove this when github actions support "if" in expressions
PYTHON_VERSION: ${{ matrix.python-version }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Lint with flake8
run: |
pip install flake8
# 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 tox
shell: bash
run: |
pip install tox
# remove the "." in the python version
tox -e "py${PYTHON_VERSION//.}"
2020-04-22 06:06:58 +00:00
- name: Upload to codecov
uses: codecov/codecov-action@v1