From 555625e351c26745cf984b08f3f3c804e589306e Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Wed, 16 Aug 2023 12:47:14 +0200 Subject: [PATCH] Updated ci-validation.yaml --- .github/workflows/ci-validation.yaml | 34 +++++++++++----------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-validation.yaml b/.github/workflows/ci-validation.yaml index 83c9deef..0376cbd8 100644 --- a/.github/workflows/ci-validation.yaml +++ b/.github/workflows/ci-validation.yaml @@ -1,5 +1,8 @@ name: Configuration Validation Check +env: + VERSION: stable + on: push: branches: [ "master" ] @@ -22,45 +25,34 @@ jobs: - name: ⤵️ Check out configuration from GitHub uses: actions/checkout@v3 - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - - name: Install dependencies - run: | - python3 -m pip install --upgrade pip - python3 -m pip install wheel colorlog python-dateutil - if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi - - - name: Install Home Assistant - run: | - python3 -m pip install homeassistant - - - name: Install Custom Components + - name: ⤵️ Check out Custom Components run: | mkdir custom_components/ # Monitor Docker git clone https://github.com/ualex73/monitor_docker mv monitor_docker/custom_components/monitor_docker/ custom_components/ - - name: Use dummy files for credentials + - name: 🔑 Use dummy files as credentials run: | cp .secrets_dummy.yaml secrets.yaml cp credentials/.google_dummy.json credentials/google.json + - name: ⤵️ Fetch Home Assistant Docker Image + run: | + docker pull -q "ghcr.io/home-assistant/home-assistant:$VERSION" + - name: 🚀 Run Home Assistant Configuration Check run: | # Show Version - docker run -it --rm \ + docker run --rm \ -v .:/config \ - "ghcr.io/home-assistant/home-assistant:stable" \ + "ghcr.io/home-assistant/home-assistant:$VERSION" \ python -m homeassistant --version # Run check_config - docker run -it --rm \ + docker run --rm \ -v .:/config \ - "ghcr.io/home-assistant/home-assistant:stable" \ + "ghcr.io/home-assistant/home-assistant:$VERSION" \ python -m homeassistant \ --config "/config" \ --script check_config -- 2.47.3