From 853809985d020d182695c679bda5f30d24fcb411 Mon Sep 17 00:00:00 2001 From: khadijahazward Date: Fri, 5 Apr 2024 15:22:58 +0530 Subject: [PATCH] Add test workflow --- .github/workflows/test.yml | 54 ++++++++++++++++++++++++++++++++++++++ gradle.properties | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..f5b4f55a67 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,54 @@ +name: Test Distribution + +on: + workflow_dispatch: + +jobs: + ubuntu-build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17.0.7' + + - name: Download Lang Repo + run: | + git clone "https://github.com/khadijahazward/ballerina-lang" + cd ballerina-lang + git checkout testFeature + + - name: Build Lang + run: ./gradlew clean build -x test -x check publishToMavenLocal + working-directory: ballerina-lang + + - name: Get Lang Version + id: lang-version + run: | + LANG_VERSION=$((grep -w "version" | cut -d= -f2 | xargs) < ballerina-lang/gradle.properties) + echo "::set-output name=version::$LANG_VERSION" + + - name: Update Lang Version + run: | + LANG_VERSION=${{ steps.lang-version.outputs.version }} + perl -pi -e "s/^\s*ballerinaLangVersion=.*/ballerinaLangVersion=$LANG_VERSION/" gradle.properties + + - name: Verify Lang Version + run: | + LANG_VERSION=$((grep -w "ballerinaLangVersion" | cut -d= -f2 | xargs) < gradle.properties) + echo "Lang Version: $LANG_VERSION" + + - name: Build Distribution + env: + packageUser: ${{ github.actor }} + packagePAT: ${{ secrets.GITHUB_TOKEN }} + devCentralToken: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} + githubAccessToken: ${{ secrets.GITHUB_TOKEN }} + ballerinaBotWorkflow: $ {{ secrets.BALLERINA_BOT_WORKFLOW }} + TEST_MODE_ACTIVE: true + run: ./gradlew clean build --stacktrace --scan --console=plain --no-daemon --continue -x project-api-tests:test -x test diff --git a/gradle.properties b/gradle.properties index ab96f54790..109e1745f8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -78,7 +78,7 @@ devToolsVersion=1.2.1-20230914-153500-664cd40 ballerinaCommandVersion=1.4.2 # API Doc UI -docUiApi=https://api.central.ballerina.io/2.0/docs/doc-ui +docUiApi=https://api.dev-central.ballerina.io/2.0/docs/doc-ui # GraphQL Tool graphqlVersion=0.8.1