Skip to content

Commit

Permalink
Create test-quickget.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit authored Sep 25, 2024
1 parent 8d6e0c4 commit 9eac9c4
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/test-quickget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Test quickget 🧪"

on:
workflow_dispatch:
push:
branches:
- master
paths:
- quickget
pull_request:
branches:
- '**'
paths:
- quickget

jobs:
quickget-tests:
name: "Run quickget tests 👟"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: "Install dependencies 📦️"
run: |
sudo apt-get -y update
sudo apt-get -y install curl qemu-utils
- name: "List OS variants 📃"
run: |
mkdir -p results
./quickget --list | tail -n +2 | tee results/list.txt
- name: "Check OS downloads 💿️"
run: |
mkdir -p results
./quickget --check | tee results/check.txt
- name: "Display results 📊"
run: |
WINDOWS=$(grep -c "windows-" results/check.txt)
FAILED=$(grep -c ^FAIL results/check.txt)
SKIPPED=$(grep -c ^SKIP results/check.txt)
PASSED=$(grep -c ^PASS results/check.txt)
CHECKED=$((WINDOWS + FAILED + SKIPPED + PASSED))
echo -e "\nResults:"
echo -e "- CHECKED:\t${CHECKED}"
echo -e "- PASSED:\t${PASSED}"
echo -e "- SKIPPED:\t${SKIPPED}\t(of which ${WINDOWS} are Windows)"
echo -e "- FAILED:\t${FAILED}\n"
grep ^FAIL results/check.txt | tee results/failed.txt
VARIATIONS=$(wc -l results/list.txt | cut -d' ' -f 1)
DOWNLOADS=$(wc -l results/check.txt | cut -d' ' -f 1)
echo
echo "Compare OS variations with downloads:"
echo -e "- Variations:\t${VARIATIONS}"
echo -e "- Downloads:\t${DOWNLOADS}"

0 comments on commit 9eac9c4

Please sign in to comment.