From e753a51edcc11c11d852eb1e30a358df3a600e88 Mon Sep 17 00:00:00 2001 From: Bryce Boe Date: Sat, 4 Jan 2020 09:54:43 -0800 Subject: [PATCH] Test using github actions --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a2461e9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: 3.x + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install .[lint] + - 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 + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install .[ci,test] + - name: Test with pytest + run: coverage run --source prawtools --module pytest + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] +name: CI +on: [push] \ No newline at end of file