Skip to content

Commit

Permalink
Create 101.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit authored Jul 6, 2024
1 parent 89ed0f9 commit 996a088
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/101.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
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

0 comments on commit 996a088

Please sign in to comment.