add optimizations #32
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 and Publish | |
| on: | |
| pull_request: | |
| branches: [ "master" ] | |
| push: | |
| 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: Run Tests | |
| id: test | |
| run: ./gradlew test --info --stacktrace -PStaticStudiosUsername=github -PStaticStudiosPassword=${{ secrets.REPOSITORY_SECRET }} | tee gradle-test.log | |
| - name: Publish to Repository | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' # only publish on push to master | |
| run: ./gradlew publish -PStaticStudiosUsername=github -PStaticStudiosPassword=${{ secrets.REPOSITORY_SECRET }} | |
| - 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/ |