diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0250c245..3ec8c63f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -11,7 +11,6 @@ jobs: - name: Checkout the Repository uses: actions/checkout@v3 - # Setup Ballerina Environment - name: Set Up Ballerina uses: ballerina-platform/setup-ballerina@v1.1.0 with: @@ -20,18 +19,62 @@ jobs: - name: Set up JDK 17 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 17.0.7 - # Build Gradle Project - name: Gradle Build run: ./gradlew build -x test && echo ${{ env.OWNER }} env: packageUser: ${{ github.actor }} packagePAT: ${{ secrets.GITHUB_TOKEN }} - # Test Ballerina Project - - name: Ballerina Test + - name: Gradle Test + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + run: ./gradlew test + env: + JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true + CLIENT_ID: ${{ secrets.CLIENT_ID }} + CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} + REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} + REFRESH_URL: ${{ secrets.REFRESH_URL }} + RECIPIENT: ${{ secrets.RECIPIENT }} + SENDER: ${{ secrets.SENDER }} + CC: ${{ secrets.CC }} + ATTACHMENT_PATH: ${{ secrets.ATTACHMENT_PATH }} + ATTACHMENT_CONTENT_TYPE: ${{ secrets.ATTACHMENT_CONTENT_TYPE }} + INLINE_IMAGE_PATH: ${{ secrets.INLINE_IMAGE_PATH }} + INLINE_IMAGE_NAME: ${{ secrets.INLINE_IMAGE_NAME }} + IMAGE_CONTENT_TYPE: ${{ secrets.IMAGE_CONTENT_TYPE }} + packageUser: ${{ github.actor }} + packagePAT: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + + build-on-windows: + runs-on: windows-latest + steps: + - name: Checkout the Repository + uses: actions/checkout@v3 + + - name: Set Up Ballerina + uses: ballerina-platform/setup-ballerina@v1.1.0 + with: + version: latest + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: "temurin" + java-version: 17.0.7 + + - name: Gradle Build + run: ./gradlew build -x test && echo ${{ env.OWNER }} + env: + packageUser: ${{ github.actor }} + packagePAT: ${{ secrets.GITHUB_TOKEN }} + + - name: Gradle Test if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} run: ./gradlew test env: @@ -48,7 +91,6 @@ jobs: INLINE_IMAGE_PATH: ${{ secrets.INLINE_IMAGE_PATH }} INLINE_IMAGE_NAME: ${{ secrets.INLINE_IMAGE_NAME }} IMAGE_CONTENT_TYPE: ${{ secrets.IMAGE_CONTENT_TYPE }} - JAVA_HOME: /usr/lib/jvm/default-jvm packageUser: ${{ github.actor }} packagePAT: ${{ secrets.GITHUB_TOKEN }}