TestBox Test Suites #741
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TestBox Test Suites | |
| # We are a reusable Workflow only | |
| on: | |
| workflow_call: | |
| secrets: | |
| SLACK_WEBHOOK_URL: | |
| required: false | |
| # Allow manual triggering | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| name: Test Suites | |
| runs-on: ubuntu-latest | |
| continue-on-error: ${{ matrix.experimental }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| commandbox_version: [ "6.3.1" ] | |
| cfengine: [ "boxlang@1", "boxlang-cfml@1", "lucee@5", "lucee@6", "lucee@7", "adobe@2023", "adobe@2025" ] | |
| jdkVersion: [ "21" ] | |
| experimental: [ false ] | |
| include: | |
| - cfengine: "boxlang@be" | |
| commandbox_version: "6.3.1" | |
| jdkVersion: "21" | |
| experimental: true | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "temurin" | |
| java-version: ${{ matrix.jdkVersion }} | |
| - name: Setup CommandBox | |
| uses: Ortus-Solutions/setup-commandbox@v2.0.1 | |
| with: | |
| version: ${{ matrix.commandbox_version }} | |
| install: testbox-cli | |
| - name: Install Dependencies | |
| run: | | |
| box install commandbox-boxlang | |
| box install --production | |
| - name: Start ${{ matrix.cfengine }}/${{ matrix.jdkVersion }} Server | |
| run: | | |
| box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug | |
| - name: Run Tests | |
| run: | | |
| box task run taskfile=build/Build target=runTests | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() | |
| with: | |
| junit_files: tests/results/**/*.xml | |
| check_name: "${{ matrix.cfengine }} ${{ matrix.jdkVersion }} Test Results" | |
| - name: Upload Test Results Artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: testbox-test-results-${{ matrix.cfengine }}-${{ matrix.jdkVersion }} | |
| path: | | |
| tests/results/**/* | |
| - name: Debugging Info | |
| if: always() | |
| run: | | |
| box server log serverConfigFile="server-${{ matrix.cfengine }}.json" | |
| - name: Upload Debugging Info To Artifacts | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.jdkVersion }} | |
| path: | | |
| .engine/**/logs/* | |
| .engine/**/WEB-INF/cfusion/logs/* | |
| - name: Slack Notification | |
| # Only on failures and NOT in pull requests | |
| if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }} | |
| uses: rtCamp/action-slack-notify@v2 | |
| env: | |
| SLACK_CHANNEL: testbox | |
| SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' | |
| SLACK_ICON_EMOJI: ":bell:" | |
| SLACK_MESSAGE: 'TestBox tests failed :cry:, check them out here: https://github.com/Ortus-Solutions/testbox/actions' | |
| SLACK_TITLE: TestBox Tests For ${{ matrix.cfengine }}-${{ matrix.jdkVersion }} failed | |
| SLACK_USERNAME: CI | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |