Skip to content

Commit

Permalink
Add setup Java step
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisaruGuruge committed Sep 19, 2023
1 parent 2118e05 commit 79f3b2c
Showing 1 changed file with 48 additions and 6 deletions.
54 changes: 48 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
- name: Checkout the Repository
uses: actions/checkout@v3

# Setup Ballerina Environment
- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
Expand All @@ -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/[email protected]
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:
Expand All @@ -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 }}

Expand Down

0 comments on commit 79f3b2c

Please sign in to comment.