| name: Android CI |
|
|
| on: |
| push: |
| branches: [ "main", "develop" ] |
| pull_request: |
| paths: |
| - "puppet/**" |
| branches: [ "main" ] |
| workflow_dispatch: |
| jobs: |
| build: |
|
|
| runs-on: ubuntu-latest |
| defaults: |
| run: |
| working-directory: puppet |
| steps: |
| - uses: actions/checkout@v3 |
| - name: set up JDK 17 |
| uses: actions/setup-java@v3 |
| with: |
| java-version: '17' |
| 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/puppet/puppet/puppet/app/google-services.json | base64 |
|
|
| - name: Putting data |
| env: |
| DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} |
| run: echo $DATA > /home/runner/work/puppet/puppet/puppet/app/google-services.json |
|
|
| - name: Grant execute permission for gradlew |
| run: chmod +x gradlew |
| |
| - 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 |
|
|