Skip to content

Commit

Permalink
ccc
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit committed Jan 11, 2025
1 parent 41614de commit 3dff643
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions .github/workflows/test-distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,31 @@ concurrency:
cancel-in-progress: true

jobs:
dependencies:
name: "Install dependencies and list supported OS"
list-variants:
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 jq
- name: "List OS 📃"
- name: "List OS variants 📃"
run: |
mkdir -p results
./quickget --list | tail -n +2 | tee results/list.txt
testing:
name: "Test"
tests:
name: "Check OS downloads 💿️"
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
env:
OS: ${{ matrix.config.os }}
strategy:
fail-fast: false
fail-fast: true
matrix:
config:
- { os: alma }
Expand Down Expand Up @@ -140,17 +142,23 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: "Install dependencies 📦️"
run: |
apt-get -y update
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
- name: "Check ${{ matrix.config.os }} downloads 💿️"
run: |
mkdir -p results
./quickget --check ${{ matrix.config.os }} | tee results/${{ matrix.config.os }}.txt || echo "### ${{ matrix.config.os }} :goberserk:" >> $GITHUB_STEP_SUMMARY
echo results/${{ matrix.config.os }}.txt >> $GITHUB_STEP_SUMMARY
./quickget --check ${{ matrix.config.os }} | tee results/${{ matrix.config.os }}.txt >> $GITHUB_STEP_SUMMARY || echo "### ${{ matrix.config.os }} :goberserk:" >> $GITHUB_STEP_SUMMARY
- name: "Display results 📊"
- name: "Display ${{ matrix.config.os }} results 📊"
run: |
RESULTS_FILE=results/${{ matrix.config.os }}.txt
if [[ -f $RESULTS_FILE ]]; then
Expand All @@ -159,12 +167,12 @@ jobs:
SKIPPED=$(grep -c ^SKIP $RESULTS_FILE)
PASSED=$(grep -c ^PASS $RESULTS_FILE)
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_FILE | tee results/failed.txt
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_FILE | tee -a results/failed.txt
VARIATIONS=$(wc -l results/list.txt | cut -d' ' -f 1)
DOWNLOADS=$(wc -l $RESULTS_FILE | cut -d' ' -f 1)
echo
Expand All @@ -175,12 +183,7 @@ jobs:
echo "Results file not found for ${{ matrix.config.os }}."
fi
- name: Save state
run: echo "failed=$(cat failed)" >> $GITHUB_ENV
- name: Set output
run: echo "failed=$(cat failed)" >> $GITHUB_OUTPUT

- name: Upload results
- name: Upload ${{ matrix.config.os }} results
uses: actions/upload-artifact@v3
with:
name: results
Expand Down

0 comments on commit 3dff643

Please sign in to comment.