Skip to content

Merge pull request #497 from Prafulrakhade/release-0.11.x #242

Merge pull request #497 from Prafulrakhade/release-0.11.x

Merge pull request #497 from Prafulrakhade/release-0.11.x #242

Workflow file for this run

name: Android Registration-Client Build
on:
push:
branches:
- '!release-branch'
- release-*
- master
- 1.*
- develop
- sprint-*
- main
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install npm dependencies
run: |
npm install
- name: Updating serverBaseURL.
run: |
find . -type f -name "*build.gradle" -print0 | xargs -0 sed -i "s/api-internal.sandbox.xyz.net/${{ github.event.inputs.defaultServerBaseURL }}/g"
- name: Build Android Registration-Client
run: |
cd client
chmod +x gradlew
./gradlew assembleDebug
ls app/build/outputs/apk/debug
find -name '*.apk'
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: apk-output
path: ./client/app/build/outputs/apk/debug/app-debug.apk
retention-days: 5
build:
name: sonar-analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
cd client
chmod +x gradlew
./gradlew build test testDebugUnitTestCoverage sonarqube --info --warning-mode all
./gradlew build sonarqube --info --warning-mode all