Skip to content

Wire up task to sourcesets. #318

Wire up task to sourcesets.

Wire up task to sourcesets. #318

name: distribution checks
on:
push:
branches: [ main ]
paths:
- gradle/**
- gradle-plugin/**
- distribution/**
pull_request:
branches: [ main ]
paths:
- gradle/**
- gradle-plugin/**
- distribution/**
jobs:
device-spread-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Generate target and test APK
run: ./gradlew :distribution:sample:app:assembleDebug :distribution:sample:app:assembleAndroidTest
env:
EMERGE_DISTRIBUTION_API_KEY: ${{ secrets.EMERGE_DISTRIBUTION_API_KEY }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
minsdk-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Generate target and test APK
run: ./gradlew :distribution:distribution:test :distribution:sample:app:assembleDebug :distribution:sample:app:assembleAndroidTest
env:
EMERGE_DISTRIBUTION_API_KEY: ${{ secrets.EMERGE_DISTRIBUTION_API_KEY }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
- name: Publish test report
uses: mikepenz/action-junit-report@v5
if: always() # always run even if the tests fail
with:
report_paths: 'build/test-results/**/*.xml'