Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4e1d54f
ADFA-519: Add instrumented test support
alome007 Mar 27, 2025
619c5d3
ADFA-315: Remove layout content directory from basic activity main te…
alome007 Mar 27, 2025
f55d0ed
ADFA-315: Remove layout content directory from basic activity main te…
alome007 Mar 27, 2025
f9b3cc8
ADFA-519: Add instrumented_test.yml
alome007 Mar 27, 2025
39471c4
ADFA-519: Add instrumented_test.yml
alome007 Mar 27, 2025
585826b
ADFA-519: Add instrumented_test.yml
alome007 Mar 27, 2025
52c62fd
ADFA-519: Add instrumented_test.yml
alome007 Mar 27, 2025
ce8cf61
ADFA-519: Add instrumented_test.yml
alome007 Mar 27, 2025
1ccb6c2
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
3355e95
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
7240612
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
1ab8f38
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
9f7dd6b
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
121ad8e
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
8008838
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
0266af4
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
9931989
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
a24a51f
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
08c1a47
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
7ba9924
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
e4c91a2
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
de76907
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
ac0e764
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
cc044ec
ADFA-519: Add instrumented_test.yml
alome007 Mar 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 0 additions & 182 deletions .github/workflows/build.yml

This file was deleted.

118 changes: 118 additions & 0 deletions .github/workflows/deploy_to_firebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Build APK
permissions:
contents: read
actions: write
on:
pull_request:
branches: [ "stage", "feature/**" ]
paths-ignore:
- '**.md'
- 'fastlane/**'
- '.github/workflows/crowdin_contributors.yml'
workflow_dispatch: { }

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Signing info (if needed)
IDE_SIGNING_ALIAS: ${{ secrets.IDE_SIGNING_ALIAS }}
IDE_SIGNING_AUTH_PASS: ${{ secrets.IDE_SIGNING_AUTH_PASS }}
IDE_SIGNING_AUTH_USER: ${{ secrets.IDE_SIGNING_AUTH_USER }}
IDE_SIGNING_KEY_PASS: ${{ secrets.IDE_SIGNING_KEY_PASS }}
IDE_SIGNING_STORE_PASS: ${{ secrets.IDE_SIGNING_STORE_PASS }}
IDE_SIGNING_URL: ${{ secrets.IDE_SIGNING_URL }}
IDE_SIGNING_KEY_BIN: ${{ secrets.IDE_SIGNING_KEY_BIN }}
# Publishing credentials (if needed)
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MVN_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MVN_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MVN_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.MVN_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MVN_SIGNING_KEY_PASSWORD }}
# Build configuration
BUILD_JAVA_VERSION: '17'
BUILD_JAVA_DIST: 'temurin'

jobs:
build_apk:
name: Build Universal APK
runs-on: macos-13
timeout-minutes: 60
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Update lib_source from Google Drive
run: |
echo "Removing existing lib_source folder..."
rm -rf lib_source
echo "Installing gdown..."
pip install gdown
echo "Downloading lib_source zip from Google Drive..."
# Replace <ZIP_FILE_ID> with the actual file ID of your zip archive.
gdown --fuzzy "https://drive.google.com/uc?id=1O-oOP5_t3QlvnXGOC03w1SYakxrUi4Xk&confirm=t" -O lib_source.zip
echo "Unzipping lib_source.zip..."
unzip lib_source.zip -d lib_source
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: ${{ env.BUILD_JAVA_VERSION }}
distribution: ${{ env.BUILD_JAVA_DIST }}

- name: Initialize submodules
run: |
git submodule init
git submodule update --remote
- name: Install CMake
run: |
brew update
brew install cmake
- name: Restore Gradle Cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Assemble Universal APK
run: ./gradlew assembleDebug

- name: Extract branch folder name
id: extract_branch
run: |
# Remove "refs/heads/" and split by "/" to get the folder name (e.g. "ADFA-123")
BRANCH_NAME=${GITHUB_REF#refs/heads/}
FOLDER_NAME=${BRANCH_NAME#*/}
echo "Branch: $BRANCH_NAME"
echo "Folder Name: $FOLDER_NAME"
echo "FOLDER_NAME=$FOLDER_NAME" >> $GITHUB_ENV

- name: Download Firebase Service Account JSON using curl
id: download_service_account
run: |
curl -L "https://jsonblob.com/api/jsonBlob/1354004779097055232" -o firebase-service-account.json
json=$(tr -d '\n' < firebase-service-account.json)
echo "json=$json" >> $GITHUB_OUTPUT

- name: Upload APK to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: codeonthego-64a92
serviceCredentialsFileContent: ${{ steps.download_service_account.outputs.json }}
groups: testers
file: app/build/outputs/apk/debug/CodeOnTheGo-*.apk
releaseNotes: "Commit Message: ${{ env.COMMIT_MESSAGE }}"
- name: Slack Notification
run: |
# Compose a Slack message with emojis and the download URL
MESSAGE=":tada: *Build Completed! And deployed to firebase!* :rocket:Jira Ticket: https://appdevforall.atlassian.net/browse/${FOLDER_NAME}"
curl -X POST -H 'Content-type: application/json' \
--data "{\"text\": \"${MESSAGE}\"}" \
https://hooks.slack.com/services/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
72 changes: 72 additions & 0 deletions .github/workflows/instrumented_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#name: Instrumented Tests
#permissions:
# contents: write
# actions: write
#on:
# push:
# branches: [ "stage", "feature/**" ]
# pull_request:
# branches: [ "stage", "feature/**" ]
# workflow_dispatch:
#
#env:
# BUILD_JAVA_VERSION: '17'
# BUILD_JAVA_DIST: 'temurin'
#
#jobs:
# run_instrumented_tests:
# name: Run Instrumented Tests
# runs-on: macos-latest
# steps:
# - name: Cancel previous runs
# uses: styfle/cancel-workflow-action@0.12.1
# with:
# access_token: ${{ github.token }}
#
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Configure Git safe directory
# run: |
# git config --global --add safe.directory "${{ github.workspace }}"
# git config --global core.longpaths true
# shell: bash
#
# - name: Initialize submodules
# run: |
# git submodule init
# git submodule update --remote
# shell: bash
#
# - name: Install Git LFS
# run: |
# git lfs install
# git lfs pull
# shell: bash
#
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# java-version: ${{ env.BUILD_JAVA_VERSION }}
# distribution: ${{ env.BUILD_JAVA_DIST }}
#
# # Use the ReactiveCircus Android Emulator Runner action to start the emulator and run tests.
# - name: Run Instrumented Tests on Emulator
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 30
# arch: "x86_64"
# script: |
# adb devices
# ./gradlew app:cAT "-Pandroid.testInstrumentationRunnerArguments.class=com.itsaky.androidide.OrderedTestSuite" --stacktrace
# env:
# ANDROIDIDE_TEST: true
#
# - name: Upload Test Reports
# if: ${{ always() }}
# uses: actions/upload-artifact@v4
# with:
# name: test-results-instrumented
# path: '**/build/reports/tests/'
2 changes: 1 addition & 1 deletion LayoutEditor
Loading