diff --git a/.github/workflows/build-with-bal-test-native.yml b/.github/workflows/build-with-bal-test-native.yml new file mode 100644 index 0000000..f218199 --- /dev/null +++ b/.github/workflows/build-with-bal-test-native.yml @@ -0,0 +1,54 @@ +name: GraalVM Check + +on: + schedule: + - cron: '30 18 * * *' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 11 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + env: + packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} + packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} + JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true + run: | + ./gradlew build + + - name: Set up GraalVM + uses: graalvm/setup-graalvm@v1 + with: + version: 'latest' + java-version: '11' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Check GraalVM installation + run: | + echo "GRAALVM_HOME: ${{ env.GRAALVM_HOME }}" + echo "JAVA_HOME: ${{ env.JAVA_HOME }}" + native-image --version + + - name: Set Up Ballerina + uses: ballerina-platform/setup-ballerina@v1 + with: + version: 2201.5.0 + + - name: Run Ballerina tests using the native executable + run: bal test --native ./cosmosdb + env: + JAVA_HOME: /usr/lib/jvm/default-jvm diff --git a/README.md b/README.md index 3f37856..0fed243 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Ballerina Azure Cosmos DB Connector =================== [![Build Status](https://github.com/ballerina-platform/module-ballerinax-azure-cosmosdb/workflows/CI/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-azure-cosmosdb/actions?query=workflow%3ACI) [![GitHub Last Commit](https://img.shields.io/github/last-commit/ballerina-platform/module-ballerinax-azure-cosmosdb.svg)](https://github.com/ballerina-platform/module-ballerinax-azure-cosmosdb/commits/master) +[![GraalVM Check](https://github.com/ballerina-platform/module-ballerinax-azure-cosmosdb/actions/workflows/build-with-bal-test-native.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-azure-cosmosdb/actions/workflows/build-with-bal-test-native.yml) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) The Cosmos DB SQL(Core) API supports all database-related operations that are carried out extensively by the existing