mirror of
https://github.com/quickemu-project/quickemu.git
synced 2024-06-02 13:05:28 +02:00
refactor: update and simplify test-quickget.yml
This commit is contained in:
parent
79c0486aad
commit
e4c612118e
93
.github/workflows/test-quickget.yml
vendored
93
.github/workflows/test-quickget.yml
vendored
|
@ -1,20 +1,13 @@
|
||||||
name: "Test quickget 🧪"
|
name: "Test quickget 🧪"
|
||||||
|
|
||||||
# Controls when the action will run.
|
|
||||||
on:
|
on:
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# Build at 00:00 on every 12th day-of-month.
|
|
||||||
#schedule:
|
|
||||||
# - cron: "0 0 */12 * *"
|
|
||||||
# Triggers the workflow on push or pull request events but only for the master branch
|
|
||||||
push:
|
push:
|
||||||
branches: '**' #'!master' # excludes master
|
branches: '**'
|
||||||
paths: [ quickget ]
|
paths: [ quickget ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: '**' # matches every branch
|
branches: '**'
|
||||||
paths:
|
paths: [ quickget ]
|
||||||
- quickget
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
@ -22,8 +15,8 @@ concurrency:
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
list-supported:
|
list-all-supported:
|
||||||
name: List supported OS
|
name: "List all supported OS 📝"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
# The type of runner that the job will run on
|
# The type of runner that the job will run on
|
||||||
#runs-on: ubuntu-latest
|
#runs-on: ubuntu-latest
|
||||||
|
@ -31,91 +24,81 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: List all supported OS variants
|
- name: "List all supported OS variants"
|
||||||
run: |
|
run: |
|
||||||
mkdir -p results
|
mkdir -p results
|
||||||
echo -e "\n\n Supported:\n\n"
|
./quickget --list | tee results/supported.txt
|
||||||
./quickget --list | tee -a results/supported.txt
|
echo -e "\nResults:"
|
||||||
echo -e "\n\nAll supported OS variants: $(cat results/supported.txt | wc -l)"
|
echo "- All supported OS variants: $(wc -l results/supported.txt | cut -d' ' -f 1)"
|
||||||
echo -e "\n\n Finished\n\n"
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: supported
|
name: supported
|
||||||
path: results/supported.txt
|
path: results/supported.txt
|
||||||
|
|
||||||
list-os-info:
|
list-all-info:
|
||||||
name: List all OS info
|
name: "List all OS info ℹ️"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Show info about all OS
|
- name: Show info about all OS
|
||||||
run: |
|
run: |
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
echo -e "\n\n OSinfo:\n\n"
|
|
||||||
mkdir -p results
|
mkdir -p results
|
||||||
distros="$(./quickget | sed '/^$/q' | tail -n +3)"
|
for os in $(./quickget | sed '/^$/q' | tail -n +3); do
|
||||||
for os in ${distros}; do
|
./quickget -12345 "${os}" | tee -a results/infos.txt
|
||||||
echo -e "\n\n ${os}" && ./quickget -12345 "${os}" | tee -a results/infos.txt
|
|
||||||
done
|
done
|
||||||
echo -e "\n\nHomepages aka number of supported OS (os_info): $(cat results/infos.txt | grep 'http' | wc -l)"
|
echo -e "\nResults:"
|
||||||
echo -e "\n\n Finished\n\n"
|
echo -e "- OS Info URLs: $(grep -c http results/infos.txt)"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: infos
|
name: infos
|
||||||
path: results/infos.txt
|
path: results/infos.txt
|
||||||
|
|
||||||
list-all-urls:
|
list-all-urls:
|
||||||
needs: [list-supported]
|
needs: [list-all-supported]
|
||||||
name: List all URLs
|
name: "List all URLs 🔗"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: List all supported systems download URLs
|
- name: "quickget --url"
|
||||||
run: |
|
run: |
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
echo -e "\n\n ISOs:\n\n"
|
|
||||||
mkdir -p results
|
mkdir -p results
|
||||||
./quickget -u | tee -a url.txt
|
./quickget --url | tee results/urls.txt
|
||||||
cat url.txt | sort > results/urls.txt
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: results
|
path: results
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: Show differences
|
- name: "Show differences ⚖️"
|
||||||
run: |
|
run: |
|
||||||
ls -R results/
|
echo -e "\nResults:"
|
||||||
echo -e "\n\nFounded/All URLs: $(cat results/urls.txt | grep 'http' | wc -l)/$(cat results/supported.txt | wc -l)"
|
echo -e "List All URLs:\t$(grep -c http results/urls.txt)"
|
||||||
echo -e "\n\n Finished\n\n"
|
echo -e "OS Info URLs:\t$(wc -l results/supported.txt | cut -d' ' -f 1)"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: urls
|
name: urls
|
||||||
path: results/urls.txt
|
path: results/urls.txt
|
||||||
|
|
||||||
check-all-urls:
|
check-all-urls:
|
||||||
name: Check all URLs
|
name: "Check all image URLs 💿️"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Checking if all downloads for Operating Systems are available
|
- name: "quickget --check"
|
||||||
run: |
|
run: |
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
echo -e "\n\n ISOs availability:\n\n"
|
|
||||||
mkdir -p results
|
mkdir -p results
|
||||||
./quickget --check | tee -a check.txt
|
./quickget --check | tee results/checks.txt
|
||||||
cat check.txt | sort > results/checks.txt
|
WINDOWS=$(grep -c "windows-" results/checks.txt)
|
||||||
GOOD=$(cat results/checks.txt | grep 'http' | wc -l)
|
FAILED=$(grep -c ^FAIL results/checks.txt)
|
||||||
WINDOWS=$(cat results/checks.txt | grep 'windows' | wc -l)
|
SKIPPED=$(grep -c ^SKIP results/checks.txt)
|
||||||
ALL=$((GOOD + WINDOWS))
|
PASSED=$(grep -c ^PASS results/checks.txt)
|
||||||
FAILED=$(grep -c 'FAIL:' results/checks.txt)
|
|
||||||
SKIPPED=$(grep -c 'SKIP:' results/checks.txt)
|
|
||||||
PASSED=$(grep -c 'PASS:' results/checks.txt)
|
|
||||||
CHECKED=$((FAILED + SKIPPED + PASSED))
|
CHECKED=$((FAILED + SKIPPED + PASSED))
|
||||||
echo -e "\n\nFAILED: $FAILED"
|
echo -e "\nResults:"
|
||||||
echo "SKIPPED: $SKIPPED"
|
echo -e "- PASSED:\t${PASSED}"
|
||||||
echo "PASSED: $PASSED"
|
echo -e "- SKIPPED:\t${SKIPPED}\t(of which ${WINDOWS} are Windows)"
|
||||||
echo "Checked/known URLs: $CHECKED/$ALL with skipped Windows
|
echo -e "- FAILED:\t${FAILED}\n"
|
||||||
echo -e "Failed:\n$(grep 'FAIL:' results/checks.txt | tee -a results/failed.txt)"
|
grep ^FAIL results/checks.txt | tee results/failed.txt
|
||||||
echo -e "\n\n Finished\n\n"
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: checks
|
name: checks
|
||||||
|
@ -126,15 +109,15 @@ jobs:
|
||||||
path: results/failed.txt
|
path: results/failed.txt
|
||||||
|
|
||||||
upload-artifacts:
|
upload-artifacts:
|
||||||
needs: [list-os-info, list-all-urls, check-all-urls]
|
needs: [list-all-info, list-all-urls, check-all-urls]
|
||||||
name: Uploading artifacts
|
name: "Uploading artifacts"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: results
|
path: results
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: List results
|
- name: "List results"
|
||||||
run: |
|
run: |
|
||||||
ls -R results/
|
ls -R results/
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user