-
Notifications
You must be signed in to change notification settings - Fork 14
86 lines (85 loc) · 2.95 KB
/
build-workflow.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
83
84
85
86
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
steps:
- name: Configure JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 18
- name: Checkout the code
uses: actions/checkout@v2
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6.1'
bundler-cache: true
- name: Run Core Tests
run: ./gradlew :formula:test
- name: Run Kotlin Coroutine Runtime Tests
run: ./gradlew :formula-coroutines:test
- name: Run Formula Android Unit Tests
run: ./gradlew :formula-android:testRelease
- name: Run Formula Android Instrumentation Tests
run: ./gradlew :formula-android-tests:testRelease
- name: Run Formula Test Module tests
run: ./gradlew :formula-test:test
- name: Run Formula Lint Tests
run: ./gradlew :formula-lint:build
- name: Generate Jacoco Report
run: ./gradlew jacocoTestReportMerged
- name: Save Jacoco Report
run: |
mkdir -p ~/jacoco/
find . -type f -regex ".*/build/reports/jacoco/jacoco.xml" -exec cp {} ~/jacoco/ \;
- name: Save test results
if: always()
run: |
./gradlew mergeReports
mkdir -p ~/junit/
find . -type f -regex ".*/build/reports/allTests/.*xml" -exec cp {} ~/junit/ \;
- name: Publish Coverage Results
if: github.event_name == 'pull_request'
run: bundle exec danger --verbose
assemble_samples:
runs-on: ubuntu-latest
steps:
- name: Configure JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 18
- name: Checkout the code
uses: actions/checkout@v2
- name: Assemble Counter
run: ./gradlew :samples:counter:assembleDebug
- name: Assemble Stopwatch Sample
run: ./gradlew :samples:stopwatch:assembleDebug
- name: Assemble Todo App
run: ./gradlew :samples:todoapp:assembleDebug
- name: Assemble Custom Stream App
run: ./gradlew :samples:custom-network-state-stream:assembleDebug
- name: Assemble Composition Sample
run: ./gradlew :samples:composition:assembleDebug
- name: Assemble Stopwatch Compose Sample
run: ./gradlew :samples:stopwatch-compose:assembleDebug
- name: Assemble Stopwatch Kotlin Coroutine Sample
run: ./gradlew :samples:stopwatch-coroutines:assembleDebug
- name: Publish all artifacts locally
run: |
./gradlew :formula:build
./gradlew :formula-android:build
./gradlew :formula-test:build
./gradlew :formula-android-compose:build
./gradlew :formula-lint:build
./gradlew publishToMavenLocal --no-parallel --no-daemon