mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 06:44:04 +02:00
VS Code Dev Container (dev & test environment) (#605)
* build: dev container
Add a VS Code Dev Container from the blueprint at bceaae212f
* build: dev container test setup
Add support for unit testing in the dev container environment with debugging and code coverage.
* ci: adjust to dev container test restructuring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ci: fix coverage collection
* build: add dummy light to HA config
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* build: update dev container to Python 3.11 (for HA 2023.6)
* Add VS Code tasks
* Use pre-commit hooks for linting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Unpin HA version
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
This commit is contained in:
parent
12dae4b6a6
commit
6283158ff7
18 changed files with 329 additions and 111 deletions
10
.github/workflows/pytest.yaml
vendored
10
.github/workflows/pytest.yaml
vendored
|
|
@ -50,11 +50,6 @@ jobs:
|
|||
run: |
|
||||
cd core
|
||||
|
||||
# Link homeassitant.components.adaptive_lighting
|
||||
cd homeassistant/components
|
||||
ln -fs ../../../custom_components/adaptive_lighting adaptive_lighting
|
||||
cd -
|
||||
|
||||
# Link adaptive_lighting tests
|
||||
cd tests/components/
|
||||
ln -fs ../../../tests adaptive_lighting
|
||||
|
|
@ -63,14 +58,17 @@ jobs:
|
|||
- name: Run pytest
|
||||
timeout-minutes: 60
|
||||
run: |
|
||||
export PYTHONPATH=${PYTHONPATH}:${PWD}
|
||||
cd core
|
||||
python3 -X dev -m pytest \
|
||||
-vvv \
|
||||
-qq \
|
||||
--timeout=9 \
|
||||
--durations=10 \
|
||||
--cov="homeassistant" \
|
||||
--cov="custom_components.adaptive_lighting" \
|
||||
--cov-report=xml \
|
||||
-o console_output_style=count \
|
||||
-p no:sugar \
|
||||
tests/components/adaptive_lighting
|
||||
env:
|
||||
HA_CLONE: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue