Skip to content

Commit

Permalink
Adjust Unit test according to JSON / cmd changes
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Oct 25, 2024
1 parent baefa17 commit 28d897e
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 10 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,18 @@ jobs:
# install packages / except howdy as its too large
export DEBIAN_FRONTEND=noninteractive
cd config
eval $"( "${PREINSTALL}" )"
#eval $"( "${PREINSTALL}" )"
eval "$PREINSTALL"
sudo bash bin/armbian-config --cmd "$TEST_ID"
eval $"( "${CONDITION}" )"
#eval $"( "${CONDITION}" )"
eval "$CONDITION"
# stats
FILENAME="data-"$(echo ${{ matrix.image.image }} | sed "s/:/-/g")"-${TEST_ID}.teststats"
echo $RELEASE >> ../${FILENAME}
bash bin/armbian-config --cmd | grep "${TEST_ID}" | xargs >> ../${FILENAME}
echo " " >> ../${FILENAME}
RAWCOMMAND=$(bash bin/armbian-config --cmd | grep "${TEST_ID}" | xargs)
COMMAND=$(echo $RAWCOMMAND | cut -d" " -f1,2)
DESCRIPTION=$(echo $RAWCOMMAND | cut -d" " -f4-)
echo "|${RELEASE}|\`armbian-config ${COMMAND}\`| ${DESCRIPTION} |" > ../${FILENAME}
- name: Upload test
uses: actions/[email protected]
Expand All @@ -161,4 +164,6 @@ jobs:
run: |
echo "# Succesful tests:" >> $GITHUB_STEP_SUMMARY
echo "|Release|Command|Description|" >> $GITHUB_STEP_SUMMARY
echo "|:---|:---|:---|" >> $GITHUB_STEP_SUMMARY
cat ./*.teststats | sed '$ s/.$//' >> $GITHUB_STEP_SUMMARY
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/DE11.conf → tests/GNOME01.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Install and tests gnome desktop
ENABLED=true
CONDITION="[ -f /usr/share/xsessions/gnome.desktop ]"
File renamed without changes.
2 changes: 0 additions & 2 deletions tests/M01.conf

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions tests/S17.conf

This file was deleted.

3 changes: 3 additions & 0 deletions tests/SY008.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ENABLED=true
PREINSTALL="bash bin/armbian-config --cmd SY009"
CONDITION="[ ! -f /usr/bin/zsh ]"
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/DE01.conf → tests/XFCE01.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Installs XFCE desktop and test it
ENABLED=true
CONDITION="[ -f /usr/share/xsessions/xfce.desktop ]"

0 comments on commit 28d897e

Please sign in to comment.