Skip to content

Commit

Permalink
Revert "Delete other workflow temporarily for android appium test"
Browse files Browse the repository at this point in the history
This reverts commit 3ee5953.
  • Loading branch information
jiji14 committed Nov 22, 2023
1 parent 745686d commit a29e5bd
Show file tree
Hide file tree
Showing 5 changed files with 290 additions and 0 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/android-automated-sdk-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: osx-install-android-sdk-automated

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
paths:
- 'setup/prereq_android_sdk_install.sh'
- '.github/workflows/android-automated-sdk-install.yml'
pull_request:
paths:
- 'setup/prereq_android_sdk_install.sh'
- '.github/workflows/android-automated-sdk-install.yml'
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '5 4 * * 0'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
install:
# The type of runner that the job will run on
runs-on: macos-latest

env:
NEW_ANDROID_SDK_ROOT: /tmp/new-install/Android/sdk

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Print the current SDK root and version
run: |
echo "SDK root before install $ANDROID_SDK_ROOT"
cat $ANDROID_SDK_ROOT/cmdline-tools/latest/source.properties
echo "Existing installed packages"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed
- name: Install to a new SDK root
run: |
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
printf "Y\nY\nY\nY\nY\n" | bash setup/prereq_android_sdk_install.sh
- name: Verify that all packages are as expected
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_17_X64
echo "Comparing $ANDROID_SDK_ROOT and $NEW_ANDROID_SDK_ROOT"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed > /tmp/existing_packages
$NEW_ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed > /tmp/new_packages
diff -uw /tmp/existing_packages /tmp/new_packages
echo "Expected differences; emulators, SDK versions, tool versions"
- name: Verify that directory structure is consistent
shell: bash -l -x {0}
run: |
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
ls -al $ANDROID_SDK_ROOT
if [ ! -d $ANDROID_SDK_ROOT/emulator ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/build-tools ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/patcher ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/extras ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/platforms ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/platform-tools ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/system-images ]; then exit 1; fi
- name: Ensure that the path is correct and installed programs are runnable
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
echo "About to run the emulator at $ANDROID_SDK_ROOT/emulator/emulator"
$ANDROID_SDK_ROOT/emulator/emulator -list-avds
echo "About to run the avdmanager at $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager list avds
- name: Setup the cordova environment
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
bash setup/setup_android_native.sh
- name: Ensure that the path is correct and the project can be activated
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
source setup/activate_native.sh
echo "About to run the avdmanager from the path" `which avdmanager`
avdmanager list avd
37 changes: 37 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
- maint_upgrade_**
pull_request:
branches:
- master
- maint_upgrade_**

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
73 changes: 73 additions & 0 deletions .github/workflows/ios-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This is a basic workflow to help you get started with Actions

name: osx-build-ios

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
- maint_upgrade_**
pull_request:
branches:
- master
- maint_upgrade_**
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '5 4 * * 0'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Print the xcode path
run: xcode-select --print-path

- name: Print the xcode setup
run: xcodebuild -version -sdk

- name: Print the brew and ruby versions
run: |
echo "brew version is "`brew --version`
echo "ruby version is" `ruby --version`
- name: Print applications through dmg
run: ls /Applications

- name: Print applications through brew
run: brew list --formula

- name: Setup the cordova environment
shell: bash -l {0}
run: |
bash setup/setup_ios_native.sh
- name: Check tool versions
shell: bash -l {0}
run: |
source setup/activate_native.sh
echo "cordova version"
npx cordova -version
echo "ionic version"
npx ionic --version
- name: Build ios
shell: bash -l {0}
run: |
source setup/activate_native.sh
npx cordova build ios
- name: Cleanup the cordova environment
shell: bash -l {0}
run: bash setup/teardown_ios_native.sh

11 changes: 11 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: prettier
on:
pull_request:

jobs:
run-prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npx prettier --check www

70 changes: 70 additions & 0 deletions .github/workflows/serve-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This is a basic workflow to help you get started with Actions

name: osx-serve-install

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
- maint_upgrade_**
- ui_feature_**
pull_request:
branches:
- master
- maint_upgrade_**
- ui_feature_**
- service_rewrite_2023
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '5 4 * * 0'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Print the xcode path
run: xcode-select --print-path

- name: Print the xcode setup
run: xcodebuild -version -sdk

- name: Print applications through dmg
run: ls /Applications

- name: Print applications through brew
run: brew list --formula

- name: Setup the serve environment
shell: bash -l {0}
run: |
bash setup/setup_serve.sh
- name: Check tool versions
shell: bash -l {0}
run: |
source setup/activate_serve.sh
echo "cordova version"
npx cordova -version
echo "ionic version"
npx ionic --version
- name: Run Jest tests
shell: bash -l {0}
run: |
npx jest
# TODO: figure out how to check that a server started correctly
# - name: Try starting it
# run: npx run serve

0 comments on commit a29e5bd

Please sign in to comment.