Skip to content

Commit

Permalink
Add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
khadijahazward committed Apr 5, 2024
1 parent 784eb7f commit 8538099
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8538099

Please sign in to comment.