Skip to content

Commit

Permalink
Fix github workflow failures
Browse files Browse the repository at this point in the history
  • Loading branch information
prakanth97 committed Dec 21, 2023
1 parent 3bac626 commit 2019949
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure all Java files use LF.
*.java eol=lf
3 changes: 0 additions & 3 deletions .github/workflows/build-with-bal-test-graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,4 @@ jobs:
lang_tag: ${{ inputs.lang_tag }}
lang_version: ${{ inputs.lang_version }}
native_image_options: '-J-Xmx7G ${{ inputs.native_image_options }}'
additional_ubuntu_build_flags: '-x :graphql-compiler-plugin-tests:test'
# TODO : Enable after fixing this issue : https://github.com/ballerina-platform/ballerina-lang/issues/38882
# additional_windows_build_flags: '-x :graphql-compiler-plugin-tests:test'
additional_windows_build_flags: '-x test'
13 changes: 13 additions & 0 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ version = "0.1.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.regexp"},
{org = "ballerina", name = "test"}
]
modules = [
Expand Down Expand Up @@ -50,6 +51,18 @@ dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.regexp"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
modules = [
{org = "ballerina", packageName = "lang.regexp", moduleName = "lang.regexp"}
]

[[package]]
org = "ballerina"
name = "lang.value"
Expand Down
3 changes: 2 additions & 1 deletion ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ task deleteDependencyTomlFiles {
}


updateTomlFiles.dependsOn unpackStdLibs
updateTomlFiles.dependsOn copyStdlibs

build.dependsOn "generatePomFileForMavenPublication"
build.dependsOn ":${packageName}-native:build"
build.dependsOn ":${packageName}-compiler-plugin:build"
Expand Down
11 changes: 5 additions & 6 deletions ballerina/tests/stream_namespace_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import ballerina/io;
import ballerina/test;
import ballerina/lang.regexp;

@Namespace {
uri: "http://www.example.com/products",
Expand Down Expand Up @@ -199,9 +200,8 @@ function testNamespaceInvoiceFullPlain() returns error? {
test:assertEquals(invoice.products.product[0].length(), 5, "Product 1 field count mismatched");
test:assertEquals(invoice.products.product[0].id, 1);
test:assertEquals(invoice.products.product[0].name, "Product 1");
test:assertEquals(invoice.products.product[0].description, string `This is the description for
Product 1.
`);
test:assertEquals(regexp:replaceAll(re `[\r\n]`, invoice.products.product[0].description, "\n"),
"This is the description for\n Product 1.\n ");
test:assertEquals(invoice.products.product[0].price.length(), 2, "Price 1 price field count mismatched");
test:assertEquals(invoice.products.product[0].price.\#content, 57.70d);
test:assertEquals(invoice.products.product[0].price.currency, "USD");
Expand All @@ -210,9 +210,8 @@ function testNamespaceInvoiceFullPlain() returns error? {
test:assertEquals(invoice.products.product[1].length(), 5, "Product 2 field count mismatched");
test:assertEquals(invoice.products.product[1].id, 2);
test:assertEquals(invoice.products.product[1].name, "Product 2");
test:assertEquals(invoice.products.product[1].description, string `This is the description for
Product 2.
`);
test:assertEquals(regexp:replaceAll(re `[\r\n]`, invoice.products.product[1].description, "\n"),
"This is the description for\n Product 2.\n ");
test:assertEquals(invoice.products.product[0].price.length(), 2, "Price 1 price field count mismatched");
test:assertEquals(invoice.products.product[1].price.\#content, 6312.36d);
test:assertEquals(invoice.products.product[1].price.currency, "LKR");
Expand Down
7 changes: 1 addition & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,11 @@ subprojects {

configurations {
ballerinaStdLibs
jbalTools
}

dependencies {
jbalTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") {
transitive = false
}

/* Standard libraries */
ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIOVersion}"
ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIoVersion}"
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ githubJohnrengelmanShadowVersion=8.1.1
underCouchDownloadVersion=4.0.4
researchgateReleaseVersion=2.8.0
ballerinaGradlePluginVersion=2.0.1
stdlibIOVersion=1.6.0
stdlibIoVersion=1.6.0

0 comments on commit 2019949

Please sign in to comment.