adaptive-lighting/.github/workflows/ci.yaml
2022-08-28 13:42:55 -07:00

44 lines
1.2 KiB
YAML

name: pytest
on:
push:
branches: [master]
pull_request:
jobs:
pytest:
name: Prepare dependencies
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.0.2
- name: Check out code from GitHub
uses: actions/checkout@v3.0.2
with:
repository: home-assistant/core
path: core
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade pytest
pip install -r core/requirements.txt
pip install -r core/requirements_test.txt
pip install -e core/
pip install $(python test_dependencies.py)
- name: Run pytest
timeout-minutes: 60
run: |
cp -r custom_components/adaptive_lighting core/homeassistant/components/adaptive_lighting
cp -r tests/ core/tests/components/adaptive_lighting
cd core
pytest tests/components/adaptive_lighting