CI: finalize

This commit is contained in:
zenobit 2025-02-14 11:33:37 +01:00
parent 684c6a00e6
commit d21faf8e87
1 changed files with 17 additions and 12 deletions

View File

@ -1,17 +1,27 @@
name: "Test supported Operating Systems" name: "Test supported 💿️"
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
branches: branches:
- '**' - '**'
paths:
- quickget
pull_request: pull_request:
branches: branches:
- '**' - '**'
paths:
- quickget
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
generate-matrix: generate-matrix:
name: "Generate Matrix" name: "Generate 💿️ Matrix"
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }} matrix: ${{ steps.set-matrix.outputs.matrix }}
@ -19,7 +29,7 @@ jobs:
- name: "Checkout repository" - name: "Checkout repository"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: "Generate Matrix" - name: "💿️ Matrix"
id: set-matrix id: set-matrix
run: | run: |
FILES=$(find actions/ -maxdepth 1 -type f -printf "%f\n" | sort) FILES=$(find actions/ -maxdepth 1 -type f -printf "%f\n" | sort)
@ -36,11 +46,6 @@ jobs:
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install curl jq sudo apt-get -y install curl jq
- name: "Display Matrix"
run: |
echo "Matrix:"
echo "${{ steps.set-matrix.outputs.matrix }}"
run-actions: run-actions:
name: "💿️" name: "💿️"
needs: generate-matrix needs: generate-matrix
@ -52,7 +57,7 @@ jobs:
- name: "Checkout repository" - name: "Checkout repository"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: "Checkout ${{ matrix.file }}" - name: "Checkout 👟 ${{ matrix.file }}"
run: | run: |
mkdir -p results mkdir -p results
./quickget --check ${{ matrix.file }} | tee results/${{ matrix.file }}.txt ./quickget --check ${{ matrix.file }} | tee results/${{ matrix.file }}.txt
@ -70,7 +75,7 @@ jobs:
path: results/${{ matrix.file }}.txt path: results/${{ matrix.file }}.txt
end: end:
name: "finish" name: "Finish 🏁"
needs: run-actions needs: run-actions
if: always() if: always()
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -84,10 +89,10 @@ jobs:
path: results path: results
merge-multiple: true merge-multiple: true
- name: "results" - name: "Display results 📊"
run: | run: |
for file in results/*.txt; do for file in results/*.txt; do
cat "$file" | tee -a ../result cat "$file" >> result
done done
PASSED=$(grep -c '^PASS:' result | wc -l) PASSED=$(grep -c '^PASS:' result | wc -l)
FAILED=$(grep -c '^FAIL:' result | wc -l 2>/dev/null | echo '0') FAILED=$(grep -c '^FAIL:' result | wc -l 2>/dev/null | echo '0')