Merge pull request #36 from hasithaa/fix_build #23
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v2 | |
| paths-ignore: | |
| - "*.md" | |
| - "docs/**" | |
| workflow_dispatch: | |
| jobs: | |
| ubuntu-build: | |
| name: Build on Ubuntu | |
| if: ${{ github.repository_owner == 'ballerina-platform' }} | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21.0.3 | |
| - name: Install Temporal CLI | |
| run: | | |
| TEMPORAL_CLI_VERSION="1.6.0" | |
| curl -sL "https://github.com/temporalio/cli/releases/download/v${TEMPORAL_CLI_VERSION}/temporal_cli_${TEMPORAL_CLI_VERSION}_linux_amd64.tar.gz" -o /tmp/temporal.tar.gz | |
| mkdir -p "${HOME}/.temporalio/bin" | |
| tar -xzf /tmp/temporal.tar.gz -C "${HOME}/.temporalio/bin" | |
| echo "${HOME}/.temporalio/bin" >> $GITHUB_PATH | |
| - name: Build the Package | |
| env: | |
| packageUser: ${{ github.actor }} | |
| packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./gradlew build | |
| - name: Run Auth Variant Integration Tests (SELF_HOSTED + CLOUD) | |
| env: | |
| packageUser: ${{ github.actor }} | |
| packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./gradlew :workflow-integration-tests:ballerinaAuthVariantTest | |
| - name: Generate mTLS Test Certificates | |
| run: ./gradlew generateMtlsTestCerts | |
| - name: Run mTLS + API-key Auth Variant Tests (with TLS proxy) | |
| env: | |
| packageUser: ${{ github.actor }} | |
| packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Start proxy and run tests in a single Gradle invocation so the proxy | |
| # remains alive for the test phase (gradle.buildFinished tears it down after). | |
| # -PtlsOnlyVariants skips the no-auth base variant to avoid running it | |
| # twice (it already ran in the previous step). | |
| ./gradlew startTlsTestProxy :workflow-integration-tests:ballerinaAuthVariantTest -PtlsOnlyVariants | |
| - name: Generate CodeCov Report | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: ballerina-platform/${{ github.event.repository.name }} | |
| files: | | |
| ballerina/target/report/workflow/coverage-report.xml | |
| integration-tests/target/report/workflow_tests/coverage-report.xml | |
| build/coverage/self-hosted-no-auth-coverage-report.xml | |
| build/coverage/cloud-api-key-coverage-report.xml | |
| build/coverage/self-hosted-mtls-coverage-report.xml | |
| fail_ci_if_error: false |