Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit 514f7e3

Browse files
authored
Core workflow tweaks
Attempt to fix reporting (still unlikely to work) and improve Compose androidTests speed.
1 parent 1e97cd2 commit 514f7e3

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/core.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ jobs:
9393
- name: Run tests
9494
run: ./gradlew test --build-cache --no-daemon --stacktrace --gradle-user-home "$GRADLE_HOME"
9595
- name: Core Test Report
96-
uses: mikepenz/[email protected]
96+
if: ${{ always() }}
97+
uses: mikepenz/[email protected]
9798
with:
9899
report_paths: '${{ github.workspace }}/constraintlayout/core/build/test-results/test/TEST-*.xml'
99-
github_token: ${{ secrets.GITHUB_TOKEN }}
100100

101101
compose-androidTest:
102102
name: Compose instrumentation tests
@@ -110,11 +110,22 @@ jobs:
110110
steps:
111111
- name: Checkout
112112
uses: actions/checkout@v2
113+
- name: Gradle Wrapper Validation
114+
uses: gradle/wrapper-validation-action@v1
113115
- name: Set up JDK 1.11
114116
uses: actions/setup-java@v1
115117
with:
116118
java-version: 1.11
117119

120+
## Caching
121+
- name: Cache build artifacts
122+
uses: actions/cache@v2
123+
with:
124+
path: ${{ env.GRADLE_HOME }}/caches
125+
# Don't set restore-keys so cache is always only valid for the current build config.
126+
# Also don't use ${{ runner.os }} in the key so we don't re-assemble for UI tests.
127+
key: gradle-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/buildSrc/**') }}-${{ github.sha }}
128+
118129
- name: AVD cache
119130
uses: actions/cache@v2
120131
id: avd-cache
@@ -156,10 +167,9 @@ jobs:
156167

157168
- name: Compose AndroidTest Report
158169
if: ${{ always() }}
159-
uses: mikepenz/action-junit-report@v1.2.1
170+
uses: mikepenz/action-junit-report@v2.9.0
160171
with:
161172
report_paths: '${{ github.workspace }}/constraintlayout/compose/build/outputs/androidTest-results/connected/TEST-*.xml'
162-
github_token: ${{ secrets.GITHUB_TOKEN }}
163173

164174

165175
lint:

0 commit comments

Comments
 (0)