Skip to content

Commit

Permalink
100apps matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit committed Jun 28, 2024
1 parent 9ff8367 commit 898fd36
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 89 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/generate-matrix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
randomAppsList=$(cut -d' ' -f2 < /opt/am/x86_64-apps | shuf -n 100)
apps=$(echo "$randomAppsList" | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=matrix::${apps}"

69 changes: 0 additions & 69 deletions .github/workflows/test.sh

This file was deleted.

58 changes: 38 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,39 @@ on:
- APP-MANAGER
- '!programs/**'
workflow_dispatch:
schedule:
- cron: '0 23 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

am:
name: Install AM 📝
- name: Generate matrix
id: set-matrix
run: |
chmod +x ./generate-matrix.sh
./generate-matrix.sh
shell: bash

tests:
needs: generate-matrix
runs-on: ubuntu-latest
strategy:
matrix:
app: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Install AM
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up environment
run: |
ls -al .github/workflows
printf '\tSetting up environment...\n'
Expand All @@ -41,23 +62,20 @@ jobs:
printf '\n\tInstalling dependencies...\n'
sudo apt install -y wget curl zsync 2> /dev/null
printf '\n\tMaking needed files executable...\n'
chmod +x ./INSTALL .github/workflows/test.sh
chmod +x ./INSTALL
printf '\n\tInstalling AM...\n'
sudo ./INSTALL
printf '\n'
echo "Installed version: $(am version)"
printf '\n\tRunning tests...\n'
.github/workflows/test.sh
printf '\n\tTest finished succesfully\n'
# t:
# name: t
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: t
# run: |
# printf '\t...\n\n'
# printf '\n\n\t...\n\n'
# echo hello
# printf '\n\n\tDONE\n\n'
- name: Install ${{ matrix.app }}
run: |
am install ${{ matrix.app }}
# - name: Test ${{ matrix.app }} installation
# run: |
# ./am run ${{ matrix.app }}

- name: Uninstall ${{ matrix.app }}
run: |
am remove ${{ matrix.app }}

0 comments on commit 898fd36

Please sign in to comment.