1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

include vars and conditional tests

This commit is contained in:
Jason N. 2024-03-12 14:12:44 -04:00
parent 67dbcd4ba4
commit 520cb5f06e
5 changed files with 22 additions and 2 deletions

View file

@ -169,7 +169,16 @@ jobs:
- name: Run ISO checks - name: Run ISO checks
run: | run: |
mv ${{ needs['build-and-push-iso']['outputs'][format('iso_name-{0}', matrix.version)] }} deploy.iso mv ${{ needs['build-and-push-iso']['outputs'][format('iso_name-{0}', matrix.version)] }} deploy.iso
make test-iso VERSION=${{ matrix.version }} FLATPAK_REMOTE_REFS="${{ env.FLATPAK_REMOTE_REFS}}" make test-iso \
ARCH: ${{ env.ARCH}} \
IMAGE_NAME: ${{ env.IMAGE_NAME}} \
IMAGE_REPO: ${{ env.IMAGE_REPO}} \
IMAGE_TAG: ${{ env.IMAGE_TAG }} \
VERSION: ${{ matrix.version }} \
VARIANT: ${{ env.VARIANT }} \
FLATPAK_REMOTE_REFS_DIR: ${{ env.FLATPAK_REMOTE_REFS_DIR }} \
SECURE_BOOT_KEY_URL: ${{ env.SECURE_BOOT_KEY_URL }} \
ENROLLMENT_PASSWORD: ${{ env.ENROLLMENT_PASSWORD }}
- name: Add Kickstart and Grub options to ISO - name: Add Kickstart and Grub options to ISO
run: | run: |

View file

@ -246,12 +246,23 @@ test-iso:
sudo mount -o loop deploy.iso /mnt/iso sudo mount -o loop deploy.iso /mnt/iso
sudo mount -t squashfs -o loop /mnt/iso/images/install.img /mnt/install sudo mount -t squashfs -o loop /mnt/iso/images/install.img /mnt/install
chmod +x $(foreach test,$(_TESTS),tests/iso/$(test)) # install tests
chmod +x $(foreach test,$(filter install_%,$(_TESTS)),tests/iso/$(test))
for test in $(_TESTS); \ for test in $(_TESTS); \
do \ do \
$(foreach var,$(_VARS),$(var)=$($(var))) ./tests/iso/$${test}; \ $(foreach var,$(_VARS),$(var)=$($(var))) ./tests/iso/$${test}; \
done done
# flapak tests
if [[ -n "$(FLATPAK_REMOTE_REFS)" ]]; \
then \
chmod +x $(foreach test,$(filter flatpak_%,$(_TESTS)),tests/iso/$(test)); \
for test in $(_TESTS); \
do \
$(foreach var,$(_VARS),$(var)=$($(var))) ./tests/iso/$${test}; \
done; \
fi
# Cleanup # Cleanup
sudo umount /mnt/install sudo umount /mnt/install
sudo umount /mnt/iso sudo umount /mnt/iso