Skip to content

Commit

Permalink
workflows: Cleaned up unittest workflow for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
msinn committed May 15, 2022
1 parent def9e14 commit 9d35eda
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: "SmartHomeNG Unittest Workflow Plugins"
on: [workflow_dispatch, push]
#on:
# workflow_dispatch:
# push:
env:
DEP_PATH: smarthomeng/requirements/all.txt
name: "Unittest Workflow Plugins"
#on: [workflow_dispatch, push]
on:
workflow_dispatch:
push:
branches:
- '*'
- '!release_doc'

jobs:
build:
runs-on: ubuntu-20.04 #latest
Expand All @@ -20,38 +22,43 @@ jobs:
- run: sudo apt-get install librrd-dev libpython3-dev
- run: sudo apt-get install gcc --only-upgrade
- uses: actions/checkout@v2
- name: Checkout SmartHomeNG DEVELOP Branch

- name: Checkout SmartHomeNG CORE DEVELOP Branch
uses: actions/checkout@v2
with:
repository: smarthomeNG/smarthome
ref: develop
path: smarthomeng
- name: Checkout SmartHomeNG/plugins DEVELOP Branch
- name: Checkout SmartHomeNG plugins DEVELOP Branch
uses: actions/checkout@v2
with:
repository: smarthomeNG/plugins
ref: develop
path: smarthomeng/plugins

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Print Python Version
run: python --version
- run: python3 -m pip install --upgrade pip #==19.3.1
#- run: pip install tox-travis virtualenv>=20.0.8 --upgrade
- run: pip install sphinx sphinx_rtd_theme recommonmark ruamel.yaml pytest
- name: Build Requirements

- name: Install requirements for unit testing
run: pip install -r smarthomeng/tests/requirements.txt
- name: Build Requirements for SmartHomeNG
run: python3 smarthomeng/tools/build_requirements.py
- name: Show requirements/base.txt
run: head smarthomeng/requirements/base.txt -n 12
- name: Show requirements/all.txt
run: head smarthomeng/requirements/all.txt -n 12
- name: Install base.txt
- name: Install SmartHomeNG base requirements
# base requirements are needed for pytest to run
run: pip install -r smarthomeng/requirements/base.txt

# --- up to here, the workflow is identical for CORE and PLUGINS ---

- name: Install SmartHomeNG all requirements
# all requirements are needed for pytest to run plugin tests
run: pip install -r smarthomeng/requirements/all.txt

#- name: Install Database Plugin Requirements
# run: pip install -r smarthomeng/plugins/database/requirements.txt
- name: Run Python Unittests
- name: Run Python Unittests for PLUGINS
working-directory: ./smarthomeng/plugins
run: pytest

0 comments on commit 9d35eda

Please sign in to comment.