Skip to content

Run App Builders during Test Workflow #14

Run App Builders during Test Workflow

Run App Builders during Test Workflow #14

Workflow file for this run

name: Test
on:
pull_request:
branches: ['*']
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
java-package: 'jdk'
- uses: ConorMacBride/install-package@v1
with:
apt: openjfx libopenjfx-jni
- name: App Builders Install
run: |
docker pull ghcr.io/sillsdev/app-builders:latest
container_id=$(docker create ghcr.io/sillsdev/app-builders:latest bash)
mkdir $HOME/app-builders
docker cp "$container_id:/" $HOME/app-builders
docker rm "$container_id"
chmod +x $HOME/app-builders/*.sh
java -version
$HOME/app-builders/sab.sh -? | head -n 4
- name: NPM Install
run: |
node --version
npm --version
npm i
cd convert
npm i
- name: Run Tests
run: |
WORK_DIR=$(pwd)
for PROGRAM in sab dab; do
echo "Processing projects for $PROGRAM"
mkdir -p "$HOME/projects/$PROGRAM"
PROJECTS=$(jq -r ".${PROGRAM}.projects[]" "test_data/projects/index.json")
for PROJECT_ZIP in $PROJECTS; do
echo "Project: $PROJECT_NAME"
unzip -q "test_data/projects/${PROGRAM}/$PROJECT_ZIP" -d "$PROJECT_DIR"
npm run clean:all > /dev/null
pushd "$PROJECT_DIR" > /dev/null
PROJECT_FILE=$(find . -type f -name "*.appDef")
"$HOME/app-builders/${PROGRAM}.sh" -load "$PROJECT_FILE" -build-modern-pwa-data-files -no-save -fp pwa-repo="$WORK_DIR" > /dev/null
popd > /dev/null
npm run convert
npm run test
done
done