-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (74 loc) · 2.63 KB
/
distribution-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: distribution checks
on:
push:
branches: [ main ]
paths:
- gradle/**
- gradle-plugin/**
- distribution/**
pull_request:
branches: [ main ]
paths:
- gradle/**
- gradle-plugin/**
- distribution/**
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx6g -Dorg.gradle.daemon=false -Dorg.gradle.vfs.watch=false -Dkotlin.incremental=false"
jobs:
device-spread-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Generate target APK
run: ./gradlew :distribution:sample:app:assembleDebug -Pandroid.useAndroidX=true
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: Generate test APK
run: ./gradlew :distribution:sample:app:assembleAndroidTest -Pandroid.useAndroidX=true
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@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Generate target APK
run: ./gradlew :distribution:sample:app:assembleDebug -Pandroid.useAndroidX=true
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: Generate test APK
run: ./gradlew :distribution:sample:app:assembleAndroidTest -Pandroid.useAndroidX=true
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@v2
if: always() # always run even if the tests fail
with:
report_paths: 'build/test-results/**/*.xml'