diff --git a/.drone.yml b/.drone.yml index d6a6b6f..ab25499 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,31 +1,26 @@ -kind: pipeline -type: docker -name: default +# Generic Home Assistant template +.ha: &ha + stage: homeassistant + variables: + PYTHONPATH: "/usr/src/app:$PYTHONPATH" + before_script: + - python -m homeassistant --version + - mv fake_secrets.yaml secrets.yaml + # remove files which fail CI checks due to HACS installed addons + - rm packages/network_map.yaml + script: + - | + python -m homeassistant \ + --config $CI_PROJECT_DIR \ + --script check_config \ + --info all + tags: + - hass -steps: - -- name: ha-latest - pull: always - image: ghcr.io/home-assistant/home-assistant:stable +# Home Assistant test jobs +ha-latest: + <<: *ha + image: + name: homeassistant/home-assistant:latest entrypoint: [""] needs: [] - -- name: discord - pull: always - image: appleboy/drone-discord:1 - avatar_url: "https://git.sthope.dev/sthope/drone_test/raw/branch/master/rick.png" - environment: - DISCORD_WEBHOOK_ID: - from_secret: discord_webhook_id - DISCORD_WEBHOOK_TOKEN: - from_secret: discord_webhook_token - when: - event: - - push - - tag - - pull_request - - deployment - status: - - changed - - failure - - success \ No newline at end of file