From 5feb225f90b26f809e33244efa24654dba1090b7 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Fri, 30 Dec 2022 01:20:51 +0100 Subject: [PATCH] Migrated from travis-ci to github actions --- .github/workflows/ci-validation.yaml | 40 +++++++++++++++++++ .secrets_travis.yaml => .secrets_dummy.yaml | 0 .travis.yml | 17 -------- ....google_travis.json => .google_dummy.json} | 0 4 files changed, 40 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ci-validation.yaml rename .secrets_travis.yaml => .secrets_dummy.yaml (100%) delete mode 100644 .travis.yml rename credentials/{.google_travis.json => .google_dummy.json} (100%) diff --git a/.github/workflows/ci-validation.yaml b/.github/workflows/ci-validation.yaml new file mode 100644 index 00000000..7284a206 --- /dev/null +++ b/.github/workflows/ci-validation.yaml @@ -0,0 +1,40 @@ +name: Home Assistant Configuration Check + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install lxml arp colorlog python-dateutil + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Install Home Assistant + run: | + pip install homeassistant + - name: Use dummy files for credentials + run: | + cp .secrets_dummy.yaml secrets.yaml + cp credentials/.google_dummy.json credentials/google.json + - name: Replace pirateweather wather integration with darksky + run: | + sed -i "s/pirateweather/darksky/" components/weather.yaml + - name: Home Assistant Configuration Check + run: | + hass -c . --script check_config --info all diff --git a/.secrets_travis.yaml b/.secrets_dummy.yaml similarity index 100% rename from .secrets_travis.yaml rename to .secrets_dummy.yaml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5309e08b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: python - -python: "3.9" - -before_install: - - cp .secrets_travis.yaml secrets.yaml - - cp credentials/.google_travis.json credentials/google.json - # Replace pirateweather wather integration with darksky - - sed -i "s/pirateweather/darksky/" components/weather.yaml - -install: - - pip3 install homeassistant - - pip3 install colorlog - - pip3 install python-dateutil - -script: - - hass -c . --script check_config --info all diff --git a/credentials/.google_travis.json b/credentials/.google_dummy.json similarity index 100% rename from credentials/.google_travis.json rename to credentials/.google_dummy.json -- 2.47.3