test-apps.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: "Apps test 🧪"
  2. env:
  3. TERM: xterm
  4. on:
  5. workflow_dispatch:
  6. branches: '**'
  7. concurrency:
  8. group: ${{ github.workflow }}-${{ github.ref }}
  9. cancel-in-progress: true
  10. jobs:
  11. am:
  12. name: test all Apps 📝
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v4
  16. - name: test all Apps
  17. run: |
  18. printf '\tSetting up environment...\n'
  19. printf '\n\tCreating directory structure...\n'
  20. mkdir -p results
  21. printf '\n\tMaking needed files executable...\n'
  22. chmod +x ./INSTALL
  23. printf '\n\tInstalling AM...\n'
  24. sudo ./INSTALL
  25. printf '\n'
  26. echo -e "Installed version: $(am version)\n\n"
  27. apps=$(cut -d' ' -f2 < /opt/am/x86_64-apps)
  28. count=$(echo "${apps}" | wc -l)
  29. echo "available apps: $count"
  30. for app in ${apps}; do
  31. echo '-------------------------------------------------------------'
  32. am -f -less
  33. echo '-------------------------------------------------------------'
  34. am -i $app && echo "OK: $app" >> results/good || \
  35. echo "FAIL! $app" >> results/bad
  36. echo '-------------------------------------------------------------'
  37. am -f --less
  38. echo '-------------------------------------------------------------'
  39. am -R $app && echo "OK: $app" >> results/removed || \
  40. echo "REMOVE! $app" >> results/noremoved
  41. echo '-------------------------------------------------------------'
  42. am -f --less
  43. echo '-------------------------------------------------------------'
  44. done
  45. good=$(cat results/good | wc -l)
  46. bad=$(cat results/bad | wc -l)
  47. removed=$(cat results/removed | wc -l)
  48. noremoved=$(cat results/noremoved | wc -l)
  49. echo -e "\n\n"
  50. echo "all/runed/ok/failed/removed/not"
  51. echo "$count/$n/$good/$bad/$removed/$noremoved"
  52. echo -e "\n\n"
  53. printf '\n\tTest finished\n'
  54. - uses: actions/upload-artifact@v4
  55. with:
  56. name: results
  57. path: results