Test 100 apps #52
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 100 random apps" | |
env: | |
TERM: xterm | |
on: | |
push: | |
branches: '**' | |
paths: | |
- 'modules/**' | |
- INSTALL | |
- APP-MANAGER | |
- '!programs/**' | |
pull_request: | |
branches: '**' | |
paths: | |
- 'modules/**' | |
- INSTALL | |
- APP-MANAGER | |
- '!programs/**' | |
workflow_dispatch: | |
schedule: | |
- cron: '0 23 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up environment and install AM | |
run: | | |
printf '\n\tCreating directory structure...\n' | |
mkdir -p results /usr/local/bin | |
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 | |
printf '\n\tInstalling AM...\n' | |
sudo ./INSTALL | |
printf '\n' | |
# Save apps list to a file in the workspace | |
- name: Generate and save apps list | |
run: | | |
printf '\tSetting up environment...\n' | |
chmod +x .github/workflows/generate-matrix.sh | |
./.github/workflows/generate-matrix.sh > apps.txt | |
shell: bash | |
# Persist apps list as an artifact | |
- name: Persist apps list | |
uses: actions/upload-artifact@v2 | |
with: | |
name: apps-list | |
path: apps.txt | |
tests: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Download the workspace with artifacts | |
- name: Download workspace | |
uses: actions/download-artifact@v2 | |
with: | |
name: apps-list | |
path: ${{ github.workspace }} | |
# You can now access apps.txt in the workspace | |
# Example: Read and use apps.txt | |
- name: Read apps list | |
run: | | |
cat ${{ github.workspace }}/apps.txt | |
# Example: Iterate over apps and perform actions | |
- name: Iterate over apps | |
run: | | |
while read -r app; do | |
printf '\n\tInstalling application: $app\n' | |
am install "$app" | |
# Add additional steps as needed (e.g., testing, uninstalling) | |
done < ${{ github.workspace }}/apps.txt |