Skip to content

Test - Apps Standalone #47

Test - Apps Standalone

Test - Apps Standalone #47

Workflow file for this run

name: Test - Apps Standalone
on:
workflow_dispatch:
workflow_call:
jobs:
apps-test:
strategy:
max-parallel: 99
matrix:
apps:
- repo: "OpenMined/DatasetLoader@main"
timeout: "15s"
- repo: "OpenMined/cpu_tracker_member@main"
timeout: "15s"
- repo: "OpenMined/logged_in@main"
timeout: "15s"
- repo: "OpenMined/inbox@main"
timeout: "15s"
- repo: "OpenMined/ring@main"
timeout: "15s"
- repo: "OpenMined/basic_aggregator@main"
timeout: "15s"
- repo: "OpenMined/fl_client@main"
timeout: "15s"
- repo: "OpenMined/fl_aggregator@main"
timeout: "15s"
- repo: "OpenMined/pretrained_model_aggregator@main"
timeout: "15s"
- repo: "OpenMined/pretrained_model_local@main"
timeout: "15s"
python-version: ["3.9", "3.12"]
os: [ubuntu-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Parse app repository info
id: apprepo
run: |
REPO=$(echo ${{ matrix.apps.repo }} | cut -d'@' -f1)
REF=$(echo ${{ matrix.apps.repo }} | cut -d'@' -f2)
echo "REPO=$REPO" >> $GITHUB_OUTPUT
echo "REF=$REF" >> $GITHUB_OUTPUT
- name: Checkout ${{ matrix.apps.repo }}
uses: actions/checkout@v4
with:
repository: ${{ steps.apprepo.outputs.REPO }}
ref: ${{ steps.apprepo.outputs.REF }}
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.10"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup timeout
if: runner.os == 'macOS'
run: |
brew install coreutils
sudo ln -s /usr/local/bin/gtimeout /usr/local/bin/timeout
- name: Provisioning dummy datasite
run: |
CONFIG_PATH="$(pwd)/config.json"
DATA_DIR="$(pwd)/data/"
mkdir -p $DATA_DIR/datasites/[email protected] $DATA_DIR/apps
echo '{
"data_dir": "'"$DATA_DIR"'",
"server_url": "http://localhost:5001",
"client_url": "http://localhost:8080",
"email": "[email protected]",
"token": null,
"email_token": null
}' > $CONFIG_PATH
cat $CONFIG_PATH
- name: Running app ${{ matrix.apps.repo }}
run: |
set +e
export SYFTBOX_CLIENT_CONFIG_PATH="$(pwd)/config.json"
timeout ${{ matrix.apps.timeout }} sh ./run.sh
exit_code=$?
echo "Exit code: $exit_code"
set -e
if [ $exit_code -eq 124 ]; then
echo "run.sh is running long as expected; marking step as success."
exit 0
else
exit $exit_code
fi