@@ -13,27 +13,20 @@ jobs:
1313 runs-on : ubuntu-latest
1414 steps :
1515 - name : Checkout code
16- uses : actions/checkout@v3
16+ uses : actions/checkout@v4
1717
1818 - name : Set up JDK 17
19- uses : actions/setup-java@v3
19+ uses : actions/setup-java@v4
2020 with :
2121 java-version : ' 17'
2222 distribution : ' temurin'
23-
24- # - name: Cache Maven dependencies
25- # uses: actions/cache@v3
26- # with:
27- # path: ~/.m2/repository
28- # key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
29- # restore-keys: |
30- # ${{ runner.os }}-maven-
23+ cache : ' maven'
3124
3225 - name : Install dependencies
33- run : mvn clean install -DskipTests
26+ run : chmod +x mvnw && ./mvnw clean install -DskipTests
3427
3528 - name : Run Tests
36- run : mvn test
29+ run : ./mvnw test
3730 env :
3831 ENV : production
3932 DATABASE_URL : ${{ secrets.DATABASE_URL }}
@@ -49,27 +42,36 @@ jobs:
4942 MAIL_SERVICE_STARTTLS : ${{ secrets.MAIL_SERVICE_STARTTLS }}
5043 MAIL_SERVICE_DOMAIN_NAME : ${{ secrets.MAIL_SERVICE_DOMAIN_NAME }}
5144
45+ - name : Upload test reports
46+ if : always()
47+ uses : actions/upload-artifact@v4
48+ with :
49+ name : test-reports
50+ path : |
51+ target/surefire-reports/
52+ target/site/jacoco/
53+
5254# lint-and-format:
5355# runs-on: ubuntu-latest
5456# needs: build-and-test
5557# steps:
5658# - name: Checkout code
57- # uses: actions/checkout@v3
59+ # uses: actions/checkout@v4
5860#
5961# - name: Set up JDK 17
60- # uses: actions/setup-java@v3
62+ # uses: actions/setup-java@v4
6163# with:
6264# java-version: '17'
6365# distribution: 'temurin'
6466#
6567# - name: Run Checkstyle
66- # run: mvn checkstyle:check
68+ # run: ./mvnw checkstyle:check
6769#
6870# - name: Run PMD
69- # run: mvn pmd:check
71+ # run: ./mvnw pmd:check
7072#
7173# - name: Run SpotBugs
72- # run: mvn spotbugs:check
74+ # run: ./mvnw spotbugs:check
7375
7476# - name: Verify code formatting with Spotless (excluding Javadocs)
75- # run: mvn spotless:check -Dspotless.apply.skip
77+ # run: ./mvnw spotless:check -Dspotless.apply.skip
0 commit comments