@@ -58,14 +58,22 @@ jobs:
5858 SKIP : local-test-core-prep,local-test-pip-prep,local-testing,local-quality
5959
6060 # Prepare default python version environment
61- ha-core-prepare :
61+ ha-core-release :
6262 runs-on : ubuntu-latest
63- name : Setup for HA-core (release)
63+ name : Setup for HA-core (release/master )
6464 needs :
6565 - pre-commit
6666 steps :
6767 - name : Check out committed code
686869+ - name : Determine Branch Test Mode
70+ id : determine_mode
71+ run : |
72+ if [[ "${{ contains(github.event.pull_request.labels.*.name, 'require-dev-pass') }}" == "true" ]]; then
73+ echo "STRICT_DEV=true" >> $GITHUB_ENV
74+ else
75+ echo "STRICT_DEV=false" >> $GITHUB_ENV
76+ fi
6977 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
7078 id : python
71797583 id : cache-hacore
76847785 env :
78- cache-name : cache-hacore
86+ cache-name : cache-hacore-release
7987 with :
8088 path : ./
8189 key : >-
8997 ${{ env.CACHE_VERSION}}-${{ runner.os }}
9098 ${{ env.CACHE_VERSION}}
9199 - name : Test through HA-core (master/release)
100+ continue-on-error : ${{ env.STRICT_DEV == 'true' }} # Allow master failures only if dev is strict
101+ run : |
102+ GITHUB_ACTIONS="" scripts/core-testing.sh
103+
104+ ha-core-dev :
105+ runs-on : ubuntu-latest
106+ name : Setup for HA-core (dev)
107+ needs :
108+ - pre-commit
109+ steps :
110+ - name : Check out committed code
111+ 112+ - name : Determine Branch Test Mode
113+ id : determine_mode
114+ run : |
115+ if [[ "${{ contains(github.event.pull_request.labels.*.name, 'require-dev-pass') }}" == "true" ]]; then
116+ echo "STRICT_DEV=true" >> $GITHUB_ENV
117+ else
118+ echo "STRICT_DEV=false" >> $GITHUB_ENV
119+ fi
120+ - name : Set up Python ${{ env.DEFAULT_PYTHON }}
121+ id : python
122+ 123+ with :
124+ python-version : ${{ env.DEFAULT_PYTHON }}
125+ - name : Restore base HA-core Python ${{ env.DEFAULT_PYTHON }} environment
126+ id : cache-hacore
127+ 128+ env :
129+ cache-name : cache-hacore-dev
130+ with :
131+ path : ./
132+ key : >-
133+ ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-hacore-${{
134+ steps.python.outputs.python-version }}-${{
135+ hashFiles('./custom_components/plugwise/manifest.json') }}-${{
136+ hashFiles('./ha-core/.git/plugwise-tracking') }}
137+ restore-keys : |
138+ ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-hacore-${{ steps.python.outputs.python-version }}-
139+ ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-hacore
140+ ${{ env.CACHE_VERSION}}-${{ runner.os }}
141+ ${{ env.CACHE_VERSION}}
142+ - name : Test through HA-core (dev)
143+ continue-on-error : ${{ env.STRICT_DEV == 'false' }} # Allow dev failures unless strict
92144 run : |
93- GITHUB_ACTIONS="" BRANCH="master " scripts/core-testing.sh
145+ GITHUB_ACTIONS="" BRANCH="dev " scripts/core-testing.sh
94146
95147 shellcheck :
96148 name : Shellcheck
0 commit comments