| name: Android CI | |
| on: | |
| push: | |
| branches: [ "main", "develop" ] | |
| pull_request: | |
| paths: | |
| - "Android/**" | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Android | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: set up JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Install Git LFS | |
| run: sudo apt-get install git-lfs | |
| - name: Set up Git LFS | |
| run: git lfs install | |
| - name: Pull LFS Objects | |
| run: git lfs pull | |
| - name: Create file | |
| run: cat /home/runner/work/Brain/Brain/Android/app/google-services.json | base64 | |
| - name: Putting data | |
| env: | |
| DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
| run: echo $DATA > /home/runner/work/Brain/Brain/Android/app/google-services.json | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| # Run Tests Build | |
| - name: Run gradle tests | |
| run: ./gradlew test | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Archive lint results | |
| if: always() | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: lint-report | |
| path: app/build/reports/lint-results-debug.html |