|
@@ -1,5 +1,7 @@
|
|
# sync with https://github.com/fphammerle/ical2vdir/blob/master/.github/workflows/python.yml
|
|
# sync with https://github.com/fphammerle/ical2vdir/blob/master/.github/workflows/python.yml
|
|
|
|
|
|
|
|
+# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
|
|
|
+
|
|
# shown in badge
|
|
# shown in badge
|
|
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
|
|
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
|
|
name: tests
|
|
name: tests
|
|
@@ -11,7 +13,26 @@ on:
|
|
- cron: '0 20 * * 5'
|
|
- cron: '0 20 * * 5'
|
|
|
|
|
|
jobs:
|
|
jobs:
|
|
- build:
|
|
+ code-format:
|
|
|
|
+ runs-on: ubuntu-18.04
|
|
|
|
+ strategy:
|
|
|
|
+ matrix:
|
|
|
|
+ python-version:
|
|
|
|
+ - 3.8
|
|
|
|
+ steps:
|
|
|
|
+ - uses: actions/checkout@v1
|
|
|
|
+ - uses: actions/setup-python@v1
|
|
|
|
+ with:
|
|
|
|
+ python-version: ${{ matrix.python-version }}
|
|
|
|
+ - run: pip install --upgrade pipenv>=2018.10.9
|
|
|
|
+ # TODO exclude dbus-python from pipenv install
|
|
|
|
+ - run: sudo apt-get install --yes --no-install-recommends libdbus-1-dev
|
|
|
|
+ - run: pipenv install --python "$PYTHON_VERSION" --deploy --dev
|
|
|
|
+ env:
|
|
|
|
+ PYTHON_VERSION: ${{ matrix.python-version }}
|
|
|
|
+ - run: pipenv graph
|
|
|
|
+ - run: pipenv run black --check .
|
|
|
|
+ tests:
|
|
runs-on: ubuntu-18.04
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
strategy:
|
|
matrix:
|
|
matrix:
|
|
@@ -27,20 +48,15 @@ jobs:
|
|
python-version: ${{ matrix.python-version }}
|
|
python-version: ${{ matrix.python-version }}
|
|
- run: pip install --upgrade pipenv>=2018.10.9
|
|
- run: pip install --upgrade pipenv>=2018.10.9
|
|
- run: sudo apt-get install --yes --no-install-recommends libdbus-1-dev
|
|
- run: sudo apt-get install --yes --no-install-recommends libdbus-1-dev
|
|
- - run: pipenv install --deploy --dev
|
|
+ - run: pipenv install --python "$PYTHON_VERSION" --deploy --dev
|
|
- # ModuleNotFoundError: No module named 'importlib_metadata'
|
|
+ env:
|
|
- # https://github.com/WanzenBug/pylint-import-requirements/issues/17
|
|
+ PYTHON_VERSION: ${{ matrix.python-version }}
|
|
- - run: if python3 -c 'import sys; sys.exit(sys.version_info < (3, 8))'; then
|
|
|
|
- pipenv graph;
|
|
|
|
- pipenv install --dev importlib-metadata;
|
|
|
|
- fi
|
|
|
|
- run: pipenv graph
|
|
- run: pipenv graph
|
|
|
|
+ - run: pipenv run pytest --cov=systemctl_mqtt --cov-report=term-missing --cov-fail-under=100
|
|
- run: pipenv run pylint --load-plugins=pylint_import_requirements systemctl_mqtt
|
|
- run: pipenv run pylint --load-plugins=pylint_import_requirements systemctl_mqtt
|
|
# https://github.com/PyCQA/pylint/issues/352
|
|
# https://github.com/PyCQA/pylint/issues/352
|
|
- run: pipenv run pylint tests/*
|
|
- run: pipenv run pylint tests/*
|
|
- run: pipenv run mypy systemctl_mqtt tests
|
|
- run: pipenv run mypy systemctl_mqtt tests
|
|
- - run: pipenv run pytest --cov=systemctl_mqtt --cov-report=term-missing --cov-fail-under=100
|
|
|
|
- - run: pipenv run black --check .
|
|
|
|
# >=1.9.0 to detect branch name
|
|
# >=1.9.0 to detect branch name
|
|
# https://github.com/coveralls-clients/coveralls-python/pull/207
|
|
# https://github.com/coveralls-clients/coveralls-python/pull/207
|
|
# https://github.com/coverallsapp/github-action/issues/4#issuecomment-547036866
|
|
# https://github.com/coverallsapp/github-action/issues/4#issuecomment-547036866
|