Pull Request / Merge #72
Workflow file for this run
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: Pull Request / Merge | |
# Manual trigger for the workflow | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
permissions: | |
contents: read # Grants read-only access to the repository contents | |
packages: read # Grants read-only access to GitHub packages | |
env: | |
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.PAT }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/[email protected] | |
# Set up JDK 17 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
# Install dependencies (optional: you can skip if it's handled elsewhere) | |
- name: Set up Gradle cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle | |
# Run Lint checks | |
- name: Run Android Lint | |
run: ./gradlew lint | |
# Run Unit tests | |
- name: Run Unit tests | |
run: ./gradlew test | |
- name: Run Gradle Jacoco Report | |
run: ./gradlew jacocoTestReport | |
- name: Upload to Codecov | |
uses: codecov/[email protected] | |
with: | |
files: build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Send Slack Message | |
run: | | |
curl -X POST -H 'Content-type: application/json' \ | |
--data '{"text":"Android Mobile SDK PR/Merge job finished with status: ${{ job.status }}"}' ${{ secrets.SLACK_WEBHOOK_URL }} |