v3 rewrite #145
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test build | |
| on: | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 | |
| - name: Change Gradle Permissions | |
| run: chmod +x ./gradlew | |
| - name: Build (skip tests) | |
| run: ./gradlew build -x test -PStaticStudiosUsername=github -PStaticStudiosPassword=${{ secrets.REPOSITORY_SECRET }} | |
| - name: Run Tests | |
| run: ./gradlew test --info --stacktrace -PStaticStudiosUsername=github -PStaticStudiosPassword=${{ secrets.REPOSITORY_SECRET }} | tee gradle-test.log | |
| continue-on-error: true | |
| - name: Upload test logs and reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gradle-test-artifacts | |
| path: | | |
| gradle-test.log | |
| build/reports/tests/test/ | |
| build/test-results/test/ | |
| - name: Fail if tests failed | |
| if: steps.test.outcome != 'success' | |
| run: exit 1 |