Skip to content

Commit d6096b3

Browse files
committed
Run tests after build
1 parent 0e04763 commit d6096b3

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/build_and_publish.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
java-version: 17
1414
distribution: temurin
1515

16-
- name: Build with Gradle
17-
run: ./gradlew build
16+
- name: Build
17+
run: ./gradlew build -x test
1818

19-
- name: run test
19+
- name: Test
2020
run: ./gradlew test check
2121

22-
- name: sonar
22+
- name: Sonar
2323
run: ./gradlew jacocoTestCoverageVerification jacocoTestReport sonar
2424
env:
2525
SONAR_URL: ${{ secrets.SONAR_URL }}
@@ -29,4 +29,13 @@
2929
name: Publish
3030
run: ./gradlew build modrinth
3131
env:
32-
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
32+
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
33+
34+
- name: Store reports if any
35+
if: failure()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: reports
39+
path: |
40+
**/build/reports/
41+
**/build/test-results/

0 commit comments

Comments
 (0)