Skip to content

Commit

Permalink
tests: Separate testing two of IMaHv2 bundles
Browse files Browse the repository at this point in the history
This is to avoid depeting disk space available for the actions.
  • Loading branch information
mefistotelis committed Oct 5, 2024
1 parent ad3e351 commit 2f606bb
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/tests-imah2-pt1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
python-version: ["3.8", "3.10"]
firmwares-bundle: ["bundle1", "bundle2"]
# No need to test any python version on multiple Ubuntu versions, the Ubuntu version is
# only to provide best matching environment for the Python.
exclude:
Expand All @@ -39,6 +40,18 @@ jobs:
# All "run" actions will start in this subdirectory
working-directory: ${{ env.working-directory }}
steps:
- name: Select firmware packages bundle 1
if: ${{ matrix.firmwares-bundle == 'bundle1' }}
run: |
echo "fw_bundle_download_link=https://mega.nz/file/Id9xiQAR#lUD13ML9_7gbwZvNnjvqLPlvnsQNqtQjCL8zeDP5ZPk" >> $GITHUB_ENV
echo "fw_bundle_download_fname=fw_packages-imah2-selected-ci-p1-v1.zip" >> $GITHUB_ENV
- name: Select firmware packages bundle 2
if: ${{ matrix.firmwares-bundle == 'bundle2' }}
run: |
echo "fw_bundle_download_link=https://mega.nz/file/lNkV0bTL#b1bDE69jlUzw7SnMAAOjbmE6Q2FuYotePz2el5TNk3E" >> $GITHUB_ENV
echo "fw_bundle_download_fname=fw_packages-imah2-selected-ci-p2-v1.zip" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -81,17 +94,11 @@ jobs:
pip install pytest pytest-cov pytest-order
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test IMaH v2 format - Download firmware package files [1/2]
# Instead of the usual actions/download-artifact, we are downloading from Mega
uses: Difegue/action-megacmd@master
with:
args: get https://mega.nz/file/Id9xiQAR#lUD13ML9_7gbwZvNnjvqLPlvnsQNqtQjCL8zeDP5ZPk ${{ env.GITHUB_WORKSPACE }}

- name: Test IMaH v2 format - Download firmware package files [2/2]
- name: Test IMaH v2 format - Download firmware package files
# Instead of the usual actions/download-artifact, we are downloading from Mega
uses: Difegue/action-megacmd@master
with:
args: get https://mega.nz/file/lNkV0bTL#b1bDE69jlUzw7SnMAAOjbmE6Q2FuYotePz2el5TNk3E ${{ env.GITHUB_WORKSPACE }}
args: get ${fw_bundle_download_link} ${{ env.GITHUB_WORKSPACE }}

- name: Test IMaH v2 format - Set ownership for downloaded files
# downloaded files are owned by root; unzip has no permission
Expand All @@ -101,8 +108,7 @@ jobs:
- name: Test IMaH v2 format - Extract downloaded files
run: |
mkdir -p fw_packages
unzip -q ../fw_packages-imah2-selected-ci-p1-v1.zip -d fw_packages
unzip -q ../fw_packages-imah2-selected-ci-p2-v1.zip -d fw_packages
unzip -q ../${fw_bundle_download_fname} -d fw_packages
rm ../fw_packages-*.zip
- name: Test IMaH v2 format - Run pyTest
Expand Down

0 comments on commit 2f606bb

Please sign in to comment.