GitHub: update unit_tests workflow steps to always re-flash device (#2150)

Co-authored-by: Konstantin Volkov <k.volkov@flipperdevices.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Konstantin Volkov 2022-12-19 21:14:44 +03:00 committed by GitHub
parent 361ca8b750
commit 84ba2690a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,12 +72,12 @@ jobs:
- name: 'Get last release tag' - name: 'Get last release tag'
id: release_tag id: release_tag
if: success() if: always()
run: | run: |
echo "tag=$(git tag -l --sort=-version:refname | grep -v "rc\|RC" | head -1)" >> $GITHUB_OUTPUT echo "tag=$(git tag -l --sort=-version:refname | grep -v "rc\|RC" | head -1)" >> $GITHUB_OUTPUT
- name: 'Decontaminate previous build leftovers' - name: 'Decontaminate previous build leftovers'
if: success() if: always()
run: | run: |
if [ -d .git ]; then if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)" git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
@ -85,25 +85,25 @@ jobs:
- name: 'Checkout latest release' - name: 'Checkout latest release'
uses: actions/checkout@v3 uses: actions/checkout@v3
if: success() if: always()
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ steps.release_tag.outputs.tag }} ref: ${{ steps.release_tag.outputs.tag }}
- name: 'Flash last release' - name: 'Flash last release'
if: success() if: always()
run: | run: |
./fbt flash OPENOCD_ADAPTER_SERIAL=2A0906016415303030303032 FIRMWARE_APP_SET=unit_tests FORCE=1 ./fbt flash OPENOCD_ADAPTER_SERIAL=2A0906016415303030303032 FIRMWARE_APP_SET=unit_tests FORCE=1
- name: 'Wait for flipper to finish updating' - name: 'Wait for flipper to finish updating'
if: success() if: always()
run: | run: |
source scripts/toolchain/fbtenv.sh source scripts/toolchain/fbtenv.sh
python3 scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}} python3 scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}}
- name: 'Format flipper SD card' - name: 'Format flipper SD card'
id: format id: format
if: success() if: always()
run: | run: |
source scripts/toolchain/fbtenv.sh source scripts/toolchain/fbtenv.sh
python3 scripts/storage.py -p ${{steps.device.outputs.flipper}} format_ext python3 scripts/storage.py -p ${{steps.device.outputs.flipper}} format_ext