Files
localtuya-modded/.github/workflows/ci.yaml
Pierre Ståhl 30392d3ac5 Initial step to have continuous integration
This commit introduces the use of tox, which currently only verifies
that code is formatted according to the black project. More checks will
come in upcoming PRs for codespell, pydocstyle, flake8 and mypy.

A GitHub actions is included that runs tox on new pull requests, so we
get automatic feedback and can block commits that fail any check.
Another (official) action that runs hassfest is included as well, to
make sure we are compatible with Home Assistant.
2020-09-22 12:29:05 +02:00

32 lines
789 B
YAML

name: CI
on: [pull_request, pull_request_target]
jobs:
build:
name: >-
${{ matrix.python-version }}
/
${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
# https://help.github.com/articles/virtual-environments-for-github-actions
platform:
- ubuntu-latest
python-version:
- 3.7
- 3.8
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 dependencies
run: |
python -m pip install --upgrade setuptools pip
python -m pip install tox-gh-actions
- name: Run tox
run: tox -q -p auto