From 7d4726c0b491e915b0897925ec761093d0afae70 Mon Sep 17 00:00:00 2001 From: Oscar Tisnado <68830577+otisnado@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:58:06 -0600 Subject: [PATCH] add boxlang to matrix and update ci tests --- .cfconfig.json | 1 + .github/workflows/tests.yml | 30 +++++++++++++++++++----------- box.json | 2 +- server-adobe@2021.json | 22 ++++++++++++++++++++++ server-adobe@2023.json | 22 ++++++++++++++++++++++ server-boxlang@1.json | 36 ++++++++++++++++++++++++++++++++++++ server-lucee@5.json | 24 ++++++++++++++++++++++++ server-lucee@6.json | 24 ++++++++++++++++++++++++ 8 files changed, 149 insertions(+), 12 deletions(-) create mode 100644 .cfconfig.json create mode 100755 server-adobe@2021.json create mode 100755 server-adobe@2023.json create mode 100644 server-boxlang@1.json create mode 100644 server-lucee@5.json create mode 100644 server-lucee@6.json diff --git a/.cfconfig.json b/.cfconfig.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.cfconfig.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e486637..eb66655 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,10 +7,17 @@ jobs: tests: name: Tests runs-on: ubuntu-20.04 + continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: cfengine: [ "lucee@5", "lucee@6", "adobe@2021", "adobe@2023" ] + coldboxVersion: [ "^6.0.0", "^7.0.0" ] + experimental: [ false ] + include: + - coldboxVersion: "be" + cfengine: "boxlang@1" + experimental: true steps: - name: Checkout Repository uses: actions/checkout@v2 @@ -25,7 +32,7 @@ jobs: uses: Ortus-Solutions/setup-commandbox@main - name: Cache CommandBox Dependencies - uses: actions/cache@v1 + uses: actions/cache@v4 if: ${{ true }} with: path: ~/.CommandBox/artifacts @@ -35,47 +42,48 @@ jobs: - name: Install Test Harness Dependencies run: | + box package set dependencies.coldbox=${{ matrix.coldboxVersion }} box install - name: Start ${{ matrix.cfengine }} Server run: | - box server start cfengine=${{ matrix.cfengine }} port=49619 --noSaveSettings --debug + box server start serverConfigFile=${{ matrix.cfengine }}.json --noSaveSettings --debug # Install Adobe 2021 cfpm modules if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then box run-script install:2021 fi - curl http://127.0.0.1:49619 + curl http://127.0.0.1:60299 - name: Run Tests run: | mkdir -p tests/results - box testbox run runner=http://127.0.0.1:49619/tests/runner.cfm --verbose outputFile=tests/results/test-results outputFormats=json,antjunit + box testbox run runner=http://127.0.0.1:60299/tests/runner.cfm --verbose outputFile=tests/results/test-results outputFormats=json,antjunit - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 + uses: EnricoMi/publish-unit-test-result-action@v2 if: always() with: - files: tests/results/**/*.xml + junit_files: tests/results/**/*.xml check_name: "${{ matrix.cfengine }} Test Results" - name: Upload Test Results to Artifacts if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: test-results-${{ matrix.cfengine }} + name: test-results-${{ matrix.cfengine }}-${{ matrix.coldboxVersion }} path: | tests/results/**/* - name: Show Server Log On Failures if: ${{ failure() }} run: | - box server log + box server log serverConfigFile="server-${{ matrix.cfengine }}.json" - name: Upload Debug Logs To Artifacts if: ${{ failure() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: Failure Debugging Info - ${{ matrix.cfengine }} + name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.coldboxVersion }} path: | .engine/**/logs/* .engine/**/WEB-INF/cfusion/logs/* diff --git a/box.json b/box.json index f46b17d..56c484d 100755 --- a/box.json +++ b/box.json @@ -27,7 +27,7 @@ "testbox":"testbox/" }, "testbox":{ - "runner":"http://localhost:49616" + "runner":"http://localhost:60299" }, "scripts":{ "format":"cfformat run modules/sendgrid-sdk/**/*.cfc,tests/resources/**/*.cfc,tests/specs/**/*.cfc --overwrite", diff --git a/server-adobe@2021.json b/server-adobe@2021.json new file mode 100755 index 0000000..9bd7f43 --- /dev/null +++ b/server-adobe@2021.json @@ -0,0 +1,22 @@ +{ + "force":true, + "openbrowser":"false", + "name": "sendgrid-sdk-adobe@2021", + "web":{ + "directoryBrowsing":true, + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + }, + "webroot":"./", + "aliases":{ + "/moduleroot/sendgrid-sdk":"./" + } + }, + "app":{ + "serverHomeDirectory":".engine/adobe2021", + "cfengine":"adobe@2021" + } +} \ No newline at end of file diff --git a/server-adobe@2023.json b/server-adobe@2023.json new file mode 100755 index 0000000..d43db04 --- /dev/null +++ b/server-adobe@2023.json @@ -0,0 +1,22 @@ +{ + "force":true, + "openbrowser":"false", + "name": "sendgrid-sdk-adobe@2023", + "web":{ + "directoryBrowsing":true, + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + }, + "webroot":"./", + "aliases":{ + "/moduleroot/sendgrid-sdk":"./" + } + }, + "app":{ + "serverHomeDirectory":".engine/adobe2023", + "cfengine":"adobe@2023" + } +} \ No newline at end of file diff --git a/server-boxlang@1.json b/server-boxlang@1.json new file mode 100644 index 0000000..35ef13d --- /dev/null +++ b/server-boxlang@1.json @@ -0,0 +1,36 @@ +{ + "app":{ + "cfengine":"boxlang@be", + "serverHomeDirectory":".engine/boxlang" + }, + "name":"sendgrid-sdk-boxlang@1", + "force":true, + "openBrowser":false, + "web":{ + "directoryBrowsing":true, + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + }, + "webroot":"./", + "aliases":{ + "/moduleroot/sendgrid-sdk":"./" + } + }, + "JVM":{ + "heapSize":"1024", + "javaVersion":"openjdk21_jdk", + "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999" + }, + "cfconfig":{ + "file":".cfconfig.json" + }, + "env":{ + "BOXLANG_DEBUG":true + }, + "scripts":{ + "onServerInitialInstall":"install bx-mail,bx-mysql,bx-derby,bx-compat-cfml@be,bx-unsafe-evaluate,bx-esapi --noSave" + } +} \ No newline at end of file diff --git a/server-lucee@5.json b/server-lucee@5.json new file mode 100644 index 0000000..22fb488 --- /dev/null +++ b/server-lucee@5.json @@ -0,0 +1,24 @@ +{ + "name":"sendgrid-sdk-lucee@5", + "app":{ + "serverHomeDirectory":".engine/lucee5", + "cfengine":"lucee@5" + }, + "web":{ + "directoryBrowsing":true, + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + }, + "webroot":"./", + "aliases":{ + "/moduleroot/sendgrid-sdk":"./" + } + }, + "jvm":{ + "heapSize":"1024" + }, + "openBrowser":"false" +} diff --git a/server-lucee@6.json b/server-lucee@6.json new file mode 100644 index 0000000..d57ce1d --- /dev/null +++ b/server-lucee@6.json @@ -0,0 +1,24 @@ +{ + "name":"sendgrid-sdk-lucee@6", + "app":{ + "serverHomeDirectory":".engine/lucee6", + "cfengine":"lucee@6" + }, + "web":{ + "directoryBrowsing":true, + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + }, + "webroot":"./", + "aliases":{ + "/moduleroot/sendgrid-sdk":"./" + } + }, + "jvm":{ + "heapSize":"1024" + }, + "openBrowser":"false" +}