Skip to content

Revise documentation for activity and workflow functions #114

Revise documentation for activity and workflow functions

Revise documentation for activity and workflow functions #114

Workflow file for this run

name: PR Build
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
- v2
jobs:
ubuntu-build:
name: Build on Ubuntu
if: ${{ github.repository_owner == 'ballerina-platform' }}
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.head_ref }}-ubuntu-build
cancel-in-progress: true
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
windows-build:
name: Build on Windows
if: ${{ github.repository_owner == 'ballerina-platform' }}
runs-on: windows-latest
concurrency:
group: ${{ github.head_ref }}-windows-build
cancel-in-progress: true
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: |
$version = "1.6.0"
Invoke-WebRequest -Uri "https://github.com/temporalio/cli/releases/download/v$version/temporal_cli_${version}_windows_amd64.zip" -OutFile "$env:TEMP\temporal.zip"
Expand-Archive -Path "$env:TEMP\temporal.zip" -DestinationPath "$env:USERPROFILE\.temporalio\bin" -Force
echo "$env:USERPROFILE\.temporalio\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Build the Project
env:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
run: |
./gradlew.bat build -x test
./gradlew.bat test