|
28 | 28 |
|
29 | 29 | jobs: |
30 | 30 | build: |
31 | | - name: Build |
32 | 31 | runs-on: ubuntu-latest |
33 | | - outputs: |
34 | | - matrix: ${{ steps.set_matrix.outputs.matrix }} |
35 | 32 | steps: |
36 | 33 |
|
37 | 34 | - name: Echo distinct ID ${{ inputs.distinct_id }} |
@@ -90,63 +87,29 @@ jobs: |
90 | 87 | done |
91 | 88 | echo "</details>" >> $GITHUB_STEP_SUMMARY |
92 | 89 |
|
93 | | - - name: Set up test matrix |
94 | | - id: set_matrix |
95 | | - run: | |
96 | | - DO_LOOTR_TEST=$(grep -E '^do_lootr_test=' gradle.properties | cut -d'=' -f2) |
97 | | - |
98 | | - if [ "$DO_LOOTR_TEST" = "true" ]; then |
99 | | - echo 'matrix={"include":[{"name":"default","task":"runClientGameTest"},{"name":"lootr","task":"runClientGameTestWithLootr"}]}' >> $GITHUB_OUTPUT |
100 | | - else |
101 | | - echo 'matrix={"include":[{"name":"default","task":"runClientGameTest"}]}' >> $GITHUB_OUTPUT |
102 | | - fi |
103 | | -
|
104 | | - test: |
105 | | - name: Run ${{ matrix.name }} client gametest |
106 | | - needs: build |
107 | | - runs-on: ubuntu-latest |
108 | | - strategy: |
109 | | - fail-fast: false |
110 | | - matrix: ${{ fromJson(needs.build.outputs.matrix) }} |
111 | | - steps: |
112 | | - |
113 | | - - name: Checkout repository |
114 | | - uses: actions/checkout@v5 |
115 | | - |
116 | | - - name: Set up Java 21 |
117 | | - uses: actions/setup-java@v5 |
118 | | - with: |
119 | | - java-version: "21" |
120 | | - distribution: "microsoft" |
121 | | - |
122 | | - - name: Grant execute permission for gradlew |
123 | | - run: chmod +x gradlew |
124 | | - |
125 | | - - name: Setup Gradle |
126 | | - uses: gradle/actions/setup-gradle@v4 |
127 | | - with: |
128 | | - build-scan-publish: true |
129 | | - build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use" |
130 | | - build-scan-terms-of-use-agree: "yes" |
131 | | - cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} |
132 | | - cache-read-only: ${{ github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/1.') }} |
133 | | - |
134 | | - - name: Run ${{ matrix.name }} client gametest |
| 90 | + - name: Run client gametests |
135 | 91 | env: |
136 | 92 | IMGUR_CLIENT_ID: ${{ secrets.IMGUR_CLIENT_ID }} |
137 | | - run: xvfb-run --auto-servernum ./gradlew ${{ matrix.task }} --build-cache --stacktrace --warning-mode=fail |
| 93 | + run: xvfb-run --auto-servernum ./gradlew runClientGameTest runClientGameTestWithLootr --build-cache --stacktrace --warning-mode=fail |
138 | 94 |
|
139 | | - - name: Upload screenshots artifact |
| 95 | + - name: Upload screenshots |
140 | 96 | uses: actions/upload-artifact@v4 |
141 | 97 | if: ${{ success() || failure() }} |
142 | 98 | with: |
143 | | - name: screenshots-${{ matrix.name }} |
| 99 | + name: screenshots |
144 | 100 | path: build/run/*/screenshots |
145 | 101 | compression-level: 0 |
146 | 102 |
|
147 | | - - name: Upload crash-reports artifact |
| 103 | + - name: Upload logs |
| 104 | + uses: actions/upload-artifact@v4 |
| 105 | + if: ${{ success() || failure() }} |
| 106 | + with: |
| 107 | + name: logs |
| 108 | + path: build/run/*/logs/latest.log |
| 109 | + |
| 110 | + - name: Upload crash reports |
148 | 111 | uses: actions/upload-artifact@v4 |
149 | 112 | if: ${{ failure() }} |
150 | 113 | with: |
151 | | - name: crash-reports-${{ matrix.name }} |
| 114 | + name: crash-reports |
152 | 115 | path: build/run/*/crash-reports |
0 commit comments