Skip to content

Add Register screen #63

Add Register screen

Add Register screen #63

Workflow file for this run

name: Build and tests
on:
push:
branches:
- "*"
jobs:
build:
name: App Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
unit-tests:
name: Unit tests
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Run Unit tests
run: ./gradlew testDebugUnitTest
- name: Bundle unit tests results artifact
uses: actions/upload-artifact@v3
with:
name: unit-tests-results
path: app/build/reports/tests/testDebugUnitTest
instrumentation-tests:
name: Instrumentation tests
needs: [ build ]
runs-on: macos-latest
timeout-minutes: 180
strategy:
matrix:
api-level: [ 30, 31 ]
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Cache Gradle and wrapper
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Run all instrumented Tests
uses: reactivecircus/android-emulator-runner@v2.28.0
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.api-level >= 32 && 'google_apis' || 'default' }}
profile: pixel_5
ram-size: 2048M
arch: x86_64
disk-size: 4096M
emulator-options: -no-snapshot-save -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew jacocoTestReport -i
- name: Upload Reports
uses: actions/upload-artifact@v3
with:
name: android-test-report
path: app/build/reports/androidTests/connected
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: android-coverage-report
path: app/build/reports/jacoco
if-no-files-found: error
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Run SonarCloud analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar --info