|
8 | 8 | branches: main |
9 | 9 | paths: |
10 | 10 | - 'programs/x86_64/**' |
11 | | - #- .github/workflows/test-apps.yml |
| 11 | + - .github/workflows/test-apps.yml |
12 | 12 |
|
13 | 13 | workflow_dispatch: |
14 | 14 | inputs: |
@@ -253,81 +253,78 @@ jobs: |
253 | 253 | # Prevent the script from calling the "exit 1" command |
254 | 254 | sed -i 's/|| exit 1//g' "programs/x86_64/${{ matrix.file }}" |
255 | 255 |
|
256 | | - # Blacklist some applications |
257 | | - if [[ "$pure_arg" =~ (bat-extras|microsoft-edge*) ]]; then |
258 | | -
|
259 | | - echo "This app is blacklisted due to known errors related to GitHub Actions" | tee -a results/log-"${{ matrix.file }}" |
260 | | -
|
261 | | - else |
262 | | -
|
263 | | - # Install the application (first attempt) |
264 | | - echo y | am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 || sudo systemctl restart tor.service || systemctl restart tor.service |
| 256 | + # Special patches |
| 257 | + if [ "$pure_arg" = bat-extras ]; then |
| 258 | + sed -i 's/if ! command/if command/g' "programs/x86_64/${{ matrix.file }}" |
| 259 | + fi |
| 260 | + |
| 261 | + # Install the application (first attempt) |
| 262 | + echo y | am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 || sudo systemctl restart tor.service || systemctl restart tor.service |
| 263 | + LASTDIR=$(ls -td /opt/* | head -1 | sed 's:.*/::') |
| 264 | +
|
| 265 | + # Check if the app needs interaction to be installed |
| 266 | + if [[ "$pure_arg" =~ (libreoffice|mpv|wine) ]]; then |
| 267 | + echo 1 | am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 || sudo systemctl restart tor.service || systemctl restart tor.service |
265 | 268 | LASTDIR=$(ls -td /opt/* | head -1 | sed 's:.*/::') |
266 | | -
|
267 | | - # Check if the app needs interaction to be installed |
268 | | - if [[ "$pure_arg" =~ (libreoffice|mpv|wine) ]]; then |
269 | | - echo 1 | am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 || sudo systemctl restart tor.service || systemctl restart tor.service |
270 | | - LASTDIR=$(ls -td /opt/* | head -1 | sed 's:.*/::') |
271 | | - if ! test -f /opt/"$LASTDIR"/remove; then |
272 | | - echo 1 | torsocks am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 |
273 | | - fi |
| 269 | + if ! test -f /opt/"$LASTDIR"/remove; then |
| 270 | + echo 1 | torsocks am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 |
274 | 271 | fi |
| 272 | + fi |
275 | 273 |
|
276 | | - # Force installation if first attempt is not success |
| 274 | + # Force installation if first attempt is not success |
| 275 | + if ! test -f /opt/"$LASTDIR"/remove; then |
| 276 | + am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 || sudo systemctl restart tor.service || systemctl restart tor.service |
| 277 | + LASTDIR=$(ls -td /opt/* | head -1 | sed 's:.*/::') |
277 | 278 | if ! test -f /opt/"$LASTDIR"/remove; then |
278 | | - am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 || sudo systemctl restart tor.service || systemctl restart tor.service |
| 279 | + torsocks am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 |
279 | 280 | LASTDIR=$(ls -td /opt/* | head -1 | sed 's:.*/::') |
280 | | - if ! test -f /opt/"$LASTDIR"/remove; then |
281 | | - torsocks am -i "programs/x86_64/${{ matrix.file }}" --debug 2>&1 |
282 | | - LASTDIR=$(ls -td /opt/* | head -1 | sed 's:.*/::') |
283 | | - fi |
284 | 281 | fi |
| 282 | + fi |
285 | 283 |
|
286 | | - # If the last modified directory is /opt/am, the installation has failed |
287 | | - if [ "$LASTDIR" = am ]; then |
288 | | - echo "### 💀 ${{ matrix.file }}" >> $GITHUB_STEP_SUMMARY |
289 | | - echo "${{ matrix.file }}" >> results/log-${{ matrix.file }} |
290 | | - exit 1 |
| 284 | + # If the last modified directory is /opt/am, the installation has failed |
| 285 | + if [ "$LASTDIR" = am ]; then |
| 286 | + echo "### 💀 ${{ matrix.file }}" >> $GITHUB_STEP_SUMMARY |
| 287 | + echo "${{ matrix.file }}" >> results/log-${{ matrix.file }} |
| 288 | + exit 1 |
291 | 289 |
|
292 | | - # If the last modified directory contains a file named "remove", check the installed files |
293 | | - elif test -f /opt/"$LASTDIR"/remove; then |
| 290 | + # If the last modified directory contains a file named "remove", check the installed files |
| 291 | + elif test -f /opt/"$LASTDIR"/remove; then |
294 | 292 |
|
295 | | - printf "\n-------------------------------------------------------------\n\n" |
| 293 | + printf "\n-------------------------------------------------------------\n\n" |
296 | 294 |
|
297 | | - # Check structure of directories in /opt |
298 | | - echo " Structure of the directory in /opt" |
299 | | - echo "" |
300 | | - ls /opt/"$LASTDIR" | tee -a results/log-"${{ matrix.file }}" |
| 295 | + # Check structure of directories in /opt |
| 296 | + echo " Structure of the directory in /opt" |
| 297 | + echo "" |
| 298 | + ls /opt/"$LASTDIR" | tee -a results/log-"${{ matrix.file }}" |
301 | 299 |
|
302 | | - printf "\n-------------------------------------------------------------\n\n" |
| 300 | + printf "\n-------------------------------------------------------------\n\n" |
303 | 301 |
|
304 | | - # Check the command in /usr/local/bin |
305 | | - echo " Command in \$PATH" |
306 | | - echo "" |
307 | | - command -v "$pure_arg" | tee -a results/log-"${{ matrix.file }}" || command -v "$LASTDIR" | tee -a results/log-"${{ matrix.file }}" || ls /usr/local/bin | tee -a results/log-"${{ matrix.file }}" |
| 302 | + # Check the command in /usr/local/bin |
| 303 | + echo " Command in \$PATH" |
| 304 | + echo "" |
| 305 | + command -v "$pure_arg" | tee -a results/log-"${{ matrix.file }}" || command -v "$LASTDIR" | tee -a results/log-"${{ matrix.file }}" || ls /usr/local/bin | tee -a results/log-"${{ matrix.file }}" |
308 | 306 |
|
309 | | - printf "\n-------------------------------------------------------------\n\n" |
| 307 | + printf "\n-------------------------------------------------------------\n\n" |
310 | 308 |
|
311 | | - # Check launchers in /usr/local/share/applications |
312 | | - echo " Launchers in /usr/local/share/applications" | tee -a results/log-"${{ matrix.file }}" |
313 | | - echo "" |
314 | | - if test -f /usr/local/share/applications/*AM.desktop 2>/dev/null; then |
315 | | - ls /usr/local/share/applications | grep "AM.desktop$" | tee -a results/log-"${{ matrix.file }}" |
316 | | - else |
317 | | - ls /usr/local/share/applications | tee -a results/log-"${{ matrix.file }}" |
318 | | - fi |
| 309 | + # Check launchers in /usr/local/share/applications |
| 310 | + echo " Launchers in /usr/local/share/applications" | tee -a results/log-"${{ matrix.file }}" |
| 311 | + echo "" |
| 312 | + if test -f /usr/local/share/applications/*AM.desktop 2>/dev/null; then |
| 313 | + ls /usr/local/share/applications | grep "AM.desktop$" | tee -a results/log-"${{ matrix.file }}" |
| 314 | + else |
| 315 | + ls /usr/local/share/applications | tee -a results/log-"${{ matrix.file }}" |
| 316 | + fi |
319 | 317 |
|
320 | | - printf "\n-------------------------------------------------------------\n\n" |
| 318 | + printf "\n-------------------------------------------------------------\n\n" |
321 | 319 |
|
322 | | - # Remove the application |
323 | | - am -R "$LASTDIR" && echo "${{ matrix.file }}" >> results/ok-${{ matrix.file }} || echo "${{ matrix.file }}" >> results/log-${{ matrix.file }} |
| 320 | + # Remove the application |
| 321 | + am -R "$LASTDIR" && echo "${{ matrix.file }}" >> results/ok-${{ matrix.file }} || echo "${{ matrix.file }}" >> results/log-${{ matrix.file }} |
324 | 322 |
|
325 | | - # Any other result is a failure |
326 | | - else |
327 | | - echo "### 💀 ${{ matrix.file }}" >> $GITHUB_STEP_SUMMARY |
328 | | - echo "${{ matrix.file }}" >> results/log-${{ matrix.file }} |
329 | | - exit 1 |
330 | | - fi |
| 323 | + # Any other result is a failure |
| 324 | + else |
| 325 | + echo "### 💀 ${{ matrix.file }}" >> $GITHUB_STEP_SUMMARY |
| 326 | + echo "${{ matrix.file }}" >> results/log-${{ matrix.file }} |
| 327 | + exit 1 |
331 | 328 | fi |
332 | 329 |
|
333 | 330 | - name: "Rename Failed Results ☝️" |
|
0 commit comments