Skip to content

Getting github workflows to use poetry #18

Getting github workflows to use poetry

Getting github workflows to use poetry #18

Workflow file for this run

name: Test [ubuntu, windows, macOS]
on:
push:
# branches: [ "master" ]
pull_request:
# branches: [ "master" ]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.9]
runs-on: ${{ matrix.os }}
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 Poetry
uses: snok/install-poetry@v1
- name: Load poetry virtualenv
run: poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --no-root
- name: Install Flake8
run: pip install flake8
- 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: Run pytest
run: poetry run pytest