Merge pull request #296 from naz013/feature/REM-932_test_and_fix_all_… #322
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: Build and Test | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'develop' | |
- 'feature/**' | |
- 'release/**' | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Create services json file | |
run: cat /home/runner/work/reminder-kotlin/reminder-kotlin/app/google-services.json | base64 | |
- name: Put data into services json file | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES }} | |
run: echo $DATA > /home/runner/work/reminder-kotlin/reminder-kotlin/app/google-services.json | |
- name: Analyse code with ktlint | |
uses: ScaCap/action-ktlint@master | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-check | |
android: true | |
fail_on_error: true | |
ktlint_version: 0.47.1 | |
- name: Upload iCalendar module Test results | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status | |
with: | |
name: iCalendar_reports | |
path: icalendar/build/test-results # path to where the xml test results are stored | |
- name: Run tests for Main module | |
run: ./gradlew testProDebugUnitTest | |
- name: Upload Main module Test results | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status | |
with: | |
name: reports | |
path: app/build/test-results # path to where the xml test results are stored |