warn about wrong action #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Home Assistant | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
ha_test: | |
name: Home Assistant Check | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8] | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Get the repository content" | |
uses: actions/checkout@v2 | |
- name: Enable version ${{ matrix.python-version }} of Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y python-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev | |
make init | |
- name: Install dependencies for custom_components | |
run: | | |
for file in $(find custom_components/ -name "manifest.json"); do | |
cat "$file" | for req in $(jq .requirements[]); | |
do pip install $(echo "$req" | jq -r .); | |
done; | |
done | |
- name: 'Copy sample configuration for Home Assistant' | |
run: cp -f .devcontainer/sample_configuration.yaml ./configuration.yaml | |
- name: Home Assistant configuration check | |
run: | | |
echo "Testing with this configuration:" | |
cat configuration.yaml | |
echo "" | |
hass --script check_config --config . |