Skip to content

add configuration of rtbdi... #86

add configuration of rtbdi...

add configuration of rtbdi... #86

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Install Poetry
uses: snok/install-poetry@v1.3.3
with:
version: 1.5.0
virtualenvs-create: true
- name: Configure poetry
run: |
poetry config virtualenvs.in-project true
- name: Poetry Cache
uses: actions/cache@v2
id: poetry-cache
with:
path: .venv
key: venv-${{ hashFiles('**/poetry.lock') }}
# This is from <https://github.com/python-poetry/poetry/blob/639d5e057/.github/workflows/main.yml#L57-L60>
- name: Ensure cache is healthy
if: steps.poetry-cache.outputs.cache-hit == 'true'
shell: bash
run: |
timeout 10s poetry run pip --version || rm -rf .venv
- name: Install dependencies
run: |
poetry install -E all
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 tdwii_plus_examples --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# --extend-ignore=203 because black puts in a space before a slicing :
# while flake8 complains (this warning is not PEP 8 compliant), If W503 pops up, that should be disabled also
# poetry run flake8 tdwii_plus_examples --count --exit-zero --extend-ignore=E203 --max-line-length=127 --statistics
# poetry run flake8 tdwii_plus_examples --count --exit-zero --max-complexity=10 --statistics
poetry run flake8 --count --extend-ignore=E203 --max-line-length=127 --statistics --per-file-ignores="tdwii_plus_examples/rtbdi_creator/ui_form.py:E266,F401,E501 tdwii_plus_examples/TDWII_PPVS_subscriber/ui_tdwii_ppvs_subscriber.py:E266,F401,E501" tdwii_plus_examples
- name: Test with pytest
run: |
poetry run pytest tdwii_plus_examples/tests