Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

docs: Archive README #147

docs: Archive README

docs: Archive README #147

Workflow file for this run

name: Test and lint
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.10" ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pipx install poetry
- name: Set poetry python version
run: poetry env use ${{ matrix.python-version }}
- id: cache-poetry
uses: actions/cache@v3
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: poetry install -E dash
- name: Run unit tests
run: poetry run pytest
- name: Run examples smoke tests
shell: bash
run: sh tests/test_examples.sh
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --indent-size=2 --statistics