Skip to content

Pull Request / Merge #55

Pull Request / Merge

Pull Request / Merge #55

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 Amazon Corretto JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
# 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 testDebugUnitTest --tests com.arcxp.video.service.AdUtilsTest
# # Run Unit tests
# - name: Run Unit tests
# run: ./gradlew test --info --stacktrace -Dkotlinx.coroutines.debug=true -Dorg.gradle.workers.max=1
#
# - 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 }}