feat(webserver): Add testing script #1311
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Development build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
cache: 'gradle' | |
- name: Restore SonarCloud packages cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Run unit tests | |
run: ./gradlew test --stacktrace | |
- name: Build with Gradle | |
run: ./gradlew assembleRelease --stacktrace | |
# - name: Upload APK | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: AdAway-dev | |
# path: app/build/outputs/apk/release/app-release-unsigned.apk | |
- name: Update dependency graph | |
uses: mikepenz/gradle-dependency-submission@v0.8.5 # Deprecated: need to be changed | |
with: | |
gradle-dependency-path: "app/build.gradle" | |
gradle-build-module: ":app" | |
gradle-build-configuration: "releaseCompileClasspath" | |
- name: Analyze project | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./gradlew -Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m sonarqube |