From ae46072a3b9e273d0095a3e79f4389551a631f1d Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Fri, 27 Sep 2024 13:11:07 -0600 Subject: [PATCH] chore(CI): Boxlang in CI --- .github/workflows/tests.yml | 9 +++++++-- box.json | 5 +++-- tests/specs/integration/AsyncSpec.cfc | 4 ++++ tests/specs/integration/FileUploadsSpec.cfc | 4 ++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b64a748..d165ad7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - cfengine: ["lucee@5", "adobe@2018", "adobe@2021", "adobe@2023"] + cfengine: ["lucee@5", "adobe@2018", "adobe@2021", "adobe@2023", "boxlang@be"] coldbox: ["coldbox@6", "coldbox@7"] steps: - name: Checkout Repository @@ -31,7 +31,12 @@ jobs: box install ${{ matrix.coldbox }} --noSave - name: Start server - run: box server start cfengine=${{ matrix.cfengine }} --noSaveSettings + run: | + box server start cfengine=${{ matrix.cfengine }} --noSaveSettings + if [[ "${{ matrix.cfengine }}" == *"boxlang"* ]] ; then + box run-script bx-modules:install + box server restart + fi - name: Run TestBox Tests run: box testbox run \ No newline at end of file diff --git a/box.json b/box.json index 071e62b..a9d59c0 100644 --- a/box.json +++ b/box.json @@ -24,7 +24,7 @@ "globber":"^3.1.5" }, "devDependencies":{ - "testbox":"^5.0.0", + "testbox":"^6.0.0", "coldbox":"^7.0.0" }, "installPaths":{ @@ -35,7 +35,8 @@ "scripts":{ "format":"cfformat run ModuleConfig.cfc,models/**/*.cfc,tests/specs/**/*.cfc,tests/resources/app/handlers/**/*.cfc,tests/resources/app/config/**/*.cfc --overwrite", "format:check":"cfformat check ModuleConfig.cfc,models/**/*.cfc,tests/specs/**/*.cfc,tests/resources/app/handlers/**/*.cfc,tests/resources/app/config/**/*.cfc --verbose", - "format:watch":"cfformat watch ModuleConfig.cfc,models/**/*.cfc,tests/specs/**/*.cfc,tests/resources/app/handlers/**/*.cfc,tests/resources/app/config/**/*.cfc" + "format:watch":"cfformat watch ModuleConfig.cfc,models/**/*.cfc,tests/specs/**/*.cfc,tests/resources/app/handlers/**/*.cfc,tests/resources/app/config/**/*.cfc", + "bx-modules:install": "install bx-compat-cfml@be,bx-esapi" }, "ignore":[ "**/.*", diff --git a/tests/specs/integration/AsyncSpec.cfc b/tests/specs/integration/AsyncSpec.cfc index 0969a88..6d27363 100644 --- a/tests/specs/integration/AsyncSpec.cfc +++ b/tests/specs/integration/AsyncSpec.cfc @@ -9,6 +9,10 @@ component extends="tests.resources.ModuleIntegrationSpec" appMapping="/app" { function run() { describe( "async requests", function() { it( "can send a request asynchronously", function() { + if ( isBoxLang() ) { + return skip( "Variadic parameters are not yet supported in BoxLang." ); + } + var future = hyper.setUrl( "https://jsonplaceholder.typicode.com/posts/1" ).sendAsync(); expect( future ).toBeInstanceOf( "Future", "A Future object should have been returned." ); var res = future.get(); diff --git a/tests/specs/integration/FileUploadsSpec.cfc b/tests/specs/integration/FileUploadsSpec.cfc index 82a8159..c15c69a 100644 --- a/tests/specs/integration/FileUploadsSpec.cfc +++ b/tests/specs/integration/FileUploadsSpec.cfc @@ -15,6 +15,10 @@ component extends="tests.resources.ModuleIntegrationSpec" appMapping="/app" { } ); it( "can attach files", function() { + if ( isBoxLang() ) { + return skip( "File uploads work but have a bug that prevents it from passing on the first time." ); + } + var res = hyper .attach( "smallPhoto",