Daily build #147
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: Daily build | |
| on: | |
| schedule: | |
| - cron: "30 2 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| daily-build: | |
| name: Daily Build and Test | |
| runs-on: ubuntu-latest | |
| env: | |
| packageUser: ${{ github.actor }} | |
| packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
| DOCKER_DEFAULT_PLATFORM: linux/amd64 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Set up Ballerina | |
| uses: ballerina-platform/setup-ballerina@v1.1.0 | |
| with: | |
| version: 2201.13.2 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew clean build --stacktrace --no-daemon | |
| - name: Run Tests | |
| run: ./gradlew test --stacktrace --no-daemon | |
| - name: Upload Coverage Report | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/target/report/**/*.xml' | |
| fail_ci_if_error: false | |
| - name: Upload Test Reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: daily-build-reports | |
| path: | | |
| **/target/report/ | |
| retention-days: 7 | |
| - name: Notify on Failure | |
| if: failure() | |
| run: echo "Daily build failed. Please check the logs." |