add smart meter L+G E570 #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python code checks | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
check_python_code: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
defaults: | |
run: | |
working-directory: backend | |
name: Running Python code checks with Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pipenv" | |
cache-dependency-path: backend/Pipfile.lock | |
- name: Install pipenv | |
run: | | |
python -m pip install --upgrade pip pipenv | |
python --version; python -m pip --version; pipenv --version | |
- name: Setup project with pipenv | |
run: | | |
pipenv --python ${{ matrix.python-version }} install --dev | |
- name: Check code style | |
run: | | |
pipenv run format_check | |
- name: Check import order | |
run: | | |
pipenv run isort_check | |
- name: Lint with pylint | |
run: | | |
pipenv run lint_check | |
- name: Run unit tests | |
run: | | |
pipenv run test |