diff --git a/.cfconfig.json b/.cfconfig.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.cfconfig.json @@ -0,0 +1 @@ +{} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a568c6f..5b6eee1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,16 +14,23 @@ jobs: env: DB_USER: root DB_PASSWORD: root + continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ] + coldboxVersion: [ "^6.0.0", "^7.0.0" ] + experimental: [ false ] + include: + - cfengine: "boxlang@1" + coldboxVersion: "be" + experimental: true steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: "adopt" java-version: "11" @@ -34,7 +41,7 @@ jobs: - name: Cache CommandBox Dependencies - uses: actions/cache@v1 + uses: actions/cache@v4 if: ${{ true }} with: path: ~/.CommandBox/artifacts @@ -43,38 +50,41 @@ jobs: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'box.json' ) }} - 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 }} --noSaveSettings --debug - curl http://127.0.0.1:51647 + box server start serverConfigFile=server-${{ matrix.cfengine }}.json --noSaveSettings --debug + curl http://127.0.0.1:60299 + - name: Run Tests run: | mkdir -p tests/results box testbox run --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 - check_name: "${{ matrix.cfengine }} Test Results" + junit_files: tests/results/**/*.xml + check_name: "${{ matrix.cfengine }} ColdBox ${{ matrix.coldboxVersion }} 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/README.md b/README.md index d14b0ae..72a7487 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,8 @@ If you need more control over the order of your interceptors you can disable the automatic loading of the CORS interceptor. If you do this you will need to register it yourself (most likely in `config/ColdBox.cfc`) as `cors.interceptors.CORS`. + +## System requirements +- [Boxlang](https://www.boxlang.io/) +- Lucee Server 5 +- Adobe 2018+ \ No newline at end of file diff --git a/box.json b/box.json index 5b24be4..91baf1b 100644 --- a/box.json +++ b/box.json @@ -23,7 +23,7 @@ "dependencies":{}, "devDependencies":{ "coldbox":"^6.0.0", - "testbox":"^4.0.0", + "testbox":"^6.0.0", "hyper":"^3.6.2" }, "installPaths":{ @@ -38,7 +38,7 @@ "tests" ], "testbox":{ - "runner":"http://localhost:51647/tests/runner.cfm", + "runner":"http://localhost:60299/tests/runner.cfm", "verbose":false } } diff --git a/server-adobe@2018.json b/server-adobe@2018.json new file mode 100644 index 0000000..509e3e2 --- /dev/null +++ b/server-adobe@2018.json @@ -0,0 +1,26 @@ +{ + "name": "cors-adobe@2018", + "app": { + "serverHomeDirectory": ".engine/adobe2018", + "cfengine": "adobe@2018" + }, + "web": { + "http": { + "port": "60299" + }, + "rewrites": { + "enable": "true" + }, + "webroot": "./", + "aliases": { + "/moduleroot/cors": "./" + } + }, + "jvm": { + "heapSize": "1024" + }, + "openBrowser": "false", + "cfconfig": { + "file": ".cfconfig.json" + } +} \ No newline at end of file diff --git a/server-adobe@2021.json b/server-adobe@2021.json new file mode 100644 index 0000000..67a2afc --- /dev/null +++ b/server-adobe@2021.json @@ -0,0 +1,29 @@ +{ + "name": "cors-adobe@2021", + "app": { + "serverHomeDirectory": ".engine/adobe2021", + "cfengine": "adobe@2021" + }, + "web": { + "http": { + "port": "60299" + }, + "rewrites": { + "enable": "true" + }, + "webroot": "./", + "aliases": { + "/moduleroot/cors": "./" + } + }, + "jvm": { + "heapSize": "1024" + }, + "openBrowser": "false", + "cfconfig": { + "file": ".cfconfig.json" + }, + "scripts": { + "onServerInstall": "cfpm install zip,debugger,mysql" + } +} \ No newline at end of file diff --git a/server-boxlang@1.json b/server-boxlang@1.json new file mode 100644 index 0000000..51edad2 --- /dev/null +++ b/server-boxlang@1.json @@ -0,0 +1,36 @@ +{ + "app": { + "cfengine": "boxlang@be", + "serverHomeDirectory": ".engine/boxlang" + }, + "name": "cors-boxlang@1", + "force": true, + "openBrowser": false, + "web": { + "directoryBrowsing": true, + "http": { + "port": "60299" + }, + "rewrites": { + "enable": "true" + }, + "webroot": "./", + "aliases": { + "/moduleroot/cors": "./" + } + }, + "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..40f5c68 --- /dev/null +++ b/server-lucee@5.json @@ -0,0 +1,26 @@ +{ + "name": "cors-lucee@5", + "app": { + "serverHomeDirectory": ".engine/lucee5", + "cfengine": "lucee@5" + }, + "web": { + "http": { + "port": "60299" + }, + "rewrites": { + "enable": "true" + }, + "webroot": "./", + "aliases": { + "/moduleroot/cors": "./" + } + }, + "jvm": { + "heapSize": "1024" + }, + "openBrowser": "false", + "cfconfig": { + "file": ".cfconfig.json" + } +} \ No newline at end of file