1212 pytest_marker :
1313 type : string
1414 required : false
15+ default : -m "not slow"
1516 pytest_path :
1617 type : string
1718 required : false
@@ -55,14 +56,21 @@ jobs:
5556 steps :
5657 - id : set-matrix
5758 run : |
58- if [[ ${{ github.event_name == 'schedule' }} == "true" ]]; then
59- matrix='["thingy91x","nrf9151dk","ppk_thingy91x"]'
59+ if [[ ${{ github.event_name == 'schedule' }} == true ]]; then
60+ marker=''
61+ matrix='["thingy91x","nrf9151dk","ppk_thingy91x"]'
62+ elif [[ ${{ github.event_name == 'push' }} == true ]]; then
63+ marker='-m "not slow"'
64+ matrix='["thingy91x"]'
6065 else
66+ marker='${{ inputs.pytest_marker }}'
6167 matrix=${{ inputs.devices }}
6268 fi
6369
64- echo "Matrix as string: $matrix"
70+ echo Matrix as string: $matrix
71+ echo Pytest marker as string: $marker
6572 echo "device_matrix=$matrix" >> $GITHUB_OUTPUT
73+ echo "pytest_marker=$marker" >> $GITHUB_OUTPUT
6674
6775 target_test :
6876 # This will create multiple jobs, one for each target defined in the matrix
@@ -131,7 +139,7 @@ jobs:
131139 asset-tracker-template-${{ inputs.artifact_fw_version }}-debug-${{ vars.DUT_DEVICE_TYPE }}-nrf91.elf
132140
133141 - name : Generate and Push RAM and FLASH Badges
134- if : ${{ matrix.device == 'thingy91x' && inputs.is_scheduled }}
142+ if : ${{ matrix.device == 'thingy91x' && github.event_name == 'schedule' }}
135143 continue-on-error : true
136144 working-directory : asset-tracker-template
137145 env :
@@ -144,12 +152,12 @@ jobs:
144152 mkdir -p results
145153 if [[ '${{ matrix.device }}' == 'ppk_thingy91x' ]]; then
146154 # For PPK device, only run tests/test_ppk
147- pytest -v ${{ inputs .pytest_marker }} \
155+ pytest -v ${{ needs.set-matrix.outputs .pytest_marker }} \
148156 --junit-xml=results/test-results.xml \
149157 --html=results/test-results.html --self-contained-html \
150158 tests/test_ppk
151159 else
152- pytest -v ${{ inputs .pytest_marker }} \
160+ pytest -v ${{ needs.set-matrix.outputs .pytest_marker }} \
153161 --junit-xml=results/test-results.xml \
154162 --html=results/test-results.html --self-contained-html \
155163 --ignore=tests/test_ppk \
0 commit comments