ccc #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test distros 🧪" | |
on: | |
workflow_dispatch: | |
push: | |
# branches: | |
# - master | |
# paths: | |
# - quickget | |
pull_request: | |
branches: | |
- '**' | |
# paths: | |
# - quickget | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
list-variants: | |
name: "List OS variants" | |
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 jq | |
- name: "List OS variants 📃" | |
run: | | |
mkdir -p results | |
./quickget --list | tail -n +2 | tee results/list.txt | |
tests: | |
name: "Check 💿️" | |
runs-on: ubuntu-22.04 | |
container: | |
image: ubuntu:22.04 | |
env: | |
OS: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: alma } | |
- { os: alpine } | |
- { os: android } | |
- { os: antix } | |
- { os: archcraft } | |
- { os: archlinux } | |
- { os: arco } | |
- { os: artixlinux } | |
- { os: athenaos } | |
- { os: batocera } | |
- { os: bazzite } | |
- { os: biglinux } | |
- { os: blendos } | |
- { os: bodhi } | |
- { os: bunsenlabs } | |
- { os: cachyos } | |
- { os: centos-stream } | |
- { os: chimeralinux } | |
- { os: crunchbang++ } | |
- { os: debian } | |
- { os: deepin } | |
- { os: devuan } | |
- { os: dragonflybsd } | |
- { os: dsl } | |
- { os: easyos } | |
- { os: elementary } | |
- { os: endeavouros } | |
- { os: endless } | |
- { os: fedora } | |
- { os: freebsd } | |
- { os: garuda } | |
- { os: gentoo } | |
- { os: ghostbsd } | |
- { os: gnomeos } | |
- { os: guix } | |
- { os: haiku } | |
- { os: kali } | |
- { os: kdeneon } | |
- { os: kolibrios } | |
- { os: linuxlite } | |
- { os: linuxmint } | |
- { os: lmde } | |
- { os: lubuntu } | |
- { os: maboxlinux } | |
- { os: macos } | |
- { os: mageia } | |
- { os: manjaro } | |
- { os: mxlinux } | |
- { os: netboot } | |
- { os: netbsd } | |
- { os: nitrux } | |
- { os: nixos } | |
- { os: nwg-shell } | |
- { os: openbsd } | |
- { os: openindiana } | |
- { os: opensuse } | |
- { os: oraclelinux } | |
- { os: parrotsec } | |
- { os: peppermint } | |
- { os: popos } | |
- { os: porteus } | |
- { os: primtux } | |
- { os: proxmox-ve } | |
- { os: pureos } | |
- { os: reactos } | |
- { os: rebornos } | |
- { os: rockylinux } | |
- { os: siduction } | |
- { os: slackware } | |
- { os: slax } | |
- { os: slint } | |
- { os: slitaz } | |
- { os: solus } | |
- { os: sparkylinux } | |
- { os: tails } | |
- { os: tinycore } | |
- { os: trisquel } | |
- { os: truenas-core } | |
- { os: truenas-scale } | |
- { os: tuxedo-os } | |
- { os: ubuntu } | |
- { os: ubuntu-budgie } | |
- { os: ubuntu-mate } | |
- { os: ubuntu-server } | |
- { os: ubuntu-unity } | |
- { os: ubuntucinnamon } | |
- { os: ubuntukylin } | |
- { os: ubuntustudio } | |
- { os: vanillaos } | |
- { os: void } | |
- { os: vxlinux } | |
- { os: windows } | |
- { os: windows-server } | |
- { os: xubuntu } | |
- { os: zorin } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Install dependencies 📦️" | |
run: | | |
apt-get -y update | |
apt-get -y install curl qemu-utils jq | |
- name: "List ${{ matrix.config.os }} variants 📃" | |
run: | | |
mkdir -p results | |
./quickget --list | tail -n +2 | grep ${{ matrix.config.os }} | tee results/1LIST.txt | |
- name: Upload list results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: 1LIST.txt | |
path: results/1LIST.txt | |
- name: "Check ${{ matrix.config.os }} downloads 💿️" | |
run: | | |
./quickget --check ${{ matrix.config.os }} | tee results/${{ matrix.config.os }}.txt | |
- name: "Display ${{ matrix.config.os }} results 📊" | |
run: | | |
cat results/1LIST.txt | grep ${{ matrix.config.os }} | |
RESULTS_FILE=results/${{ matrix.config.os }}.txt | |
WINDOWS=$(grep -c "windows-" results/${{ matrix.config.os }}.txt) | |
FAILED=$(grep -c ^FAIL results/${{ matrix.config.os }}.txt) | |
SKIPPED=$(grep -c ^SKIP results/${{ matrix.config.os }}.txt) | |
PASSED=$(grep -c ^PASS results/${{ matrix.config.os }}.txt) | |
CHECKED=$((WINDOWS + FAILED + SKIPPED + PASSED)) | |
echo -e "\nResults: ${{ matrix.config.os }}" | |
echo -e "- CHECKED:\t${CHECKED}" >> $GITHUB_STEP_SUMMARY | |
echo -e "- PASSED:\t${PASSED}" >> $GITHUB_STEP_SUMMARY | |
echo -e "- SKIPPED:\t${SKIPPED}\t(of which ${WINDOWS} are Windows)" >> $GITHUB_STEP_SUMMARY | |
echo -e "- FAILED:\t${FAILED}\n" >> $GITHUB_STEP_SUMMARY | |
grep ^FAIL results/${{ matrix.config.os }}.txt | tee -a results/FAILED.txt | |
VARIATIONS=$(cut -d' ' -f 1 < results/1LIST.txt | grep ${{ matrix.config.os }} | wc -l) | |
DOWNLOADS=$(wc -l results/${{ matrix.config.os }}.txt | cut -d' ' -f 1) | |
echo | |
echo "Compare OS variations with downloads:" | |
echo -e "- Variations:\t${VARIATIONS}" | |
echo -e "- Downloads:\t${DOWNLOADS}" | |
cat results/${{ matrix.config.os }}.txt | grep -v 'PASS:' >> $GITHUB_STEP_SUMMARY && exit 1 || echo ":rocket:" >> $GITHUB_STEP_SUMMARY && exit 0 | |
- name: Upload ${{ matrix.config.os }} results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results | |
path: results/ |