Add Github Actions build.
This commit is contained in:
parent
67025c1c0b
commit
73cc073632
1 changed files with 38 additions and 0 deletions
38
.github/workflows/main.yml
vendored
Normal file
38
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: build
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
python-version: [3.7]
|
||||
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//.}"
|
Loading…
Reference in a new issue