Add aggregation #39
Workflow file for this run
This file contains 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: Pull Request | |
on: [ pull_request ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mongodb: | |
image: mongo:4.2.0 | |
env: | |
# Following credentials are only used during testing in docker container | |
MONGO_INITDB_ROOT_USERNAME: admin | |
MONGO_INITDB_ROOT_PASSWORD: admin | |
ports: | |
- 27011:27017 | |
mongodb-ssl: | |
image: rzhilkibaev/mongo-x509-auth-ssl:latest | |
ports: | |
- 27012:27017 | |
steps: | |
- uses: actions/checkout@v3 | |
# Set up Java Environment | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17.0.7 | |
# Setup Ballerina Environment | |
- name: Set Up Ballerina | |
uses: ballerina-platform/[email protected] | |
with: | |
version: latest | |
# Grant execute permission to the gradlew script | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
# Build the project with Gradle | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | |
run: | | |
./gradlew build -x test | |
- name: Ballerina Build | |
run: bal pack ./ballerina | |
env: | |
JAVA_HOME: /usr/lib/jvm/default-jvm | |
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | |
# Test Ballerina MongoDB-SSL | |
- name: SSL Tests | |
run: bal test --groups mongodb-ssl --test-report --code-coverage --coverage-format=xml ./ballerina | |
env: | |
JAVA_HOME: /usr/lib/jvm/default-jvm | |
# Following credentials are only used during testing in docker container | |
MONGODB_USER: C=US,ST=CA,L=San Francisco,O=Jaspersoft,OU=JSDev,CN=admin | |
- name: Upload SSL test coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
# Test Ballerina MongoDB | |
- name: MongoDB Test | |
run: bal test --groups mongodb --test-report --code-coverage --coverage-format=xml ./ballerina | |
env: | |
JAVA_HOME: /usr/lib/jvm/default-jvm | |
# Following credentials are only used during testing in docker container | |
MONGODB_USER: admin | |
MONGODB_PASSWORD: admin | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 |