-
-
Notifications
You must be signed in to change notification settings - Fork 41
65 lines (55 loc) · 2.01 KB
/
tests.yml
File metadata and controls
65 lines (55 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Run test suite
on: [workflow_dispatch, workflow_call]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
cfengine: ["lucee@6", "lucee@7", "adobe@2025", "boxlang"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: "21"
distribution: "temurin"
- name: Setup CommandBox CLI
uses: Ortus-Solutions/setup-commandbox@7be599028dcf77743854b2f6c720b15316f39be2 # v2.0.1
with:
version: latest
- name: Install dependencies
run: box install
- name: Start a server
run: box server start cfengine=${{ matrix.cfengine }} port=8080 host=0.0.0.0
- name: Install ACF packages
if: ${{ matrix.cfengine == 'adobe@2025' }}
run: box run-script cfpmInstall
- name: Install BX packages
if: ${{ matrix.cfengine == 'boxlang' }}
run: box run-script boxLangInstall
- name: Run TestBox Tests
id: run_tests
run: |
mkdir -p test/results
box testbox run runner="http://localhost:8080/test/index.cfm" outputFile="test/results/test-results" outputFormats="json"
continue-on-error: true
timeout-minutes: 10
- name: Display Test Results
if: always()
run: |
if [ -f "test/results/test-results.json" ]; then
echo "=== Test Results Summary (${{ matrix.cfengine }}) ==="
cat test/results/test-results.json | jq -r '
"Total Bundles: \(.totalBundles)",
"Total Suites: \(.totalSuites)",
"Total Specs: \(.totalSpecs)",
"Total Pass: \(.totalPass)",
"Total Fail: \(.totalFail)",
"Total Error: \(.totalError)",
"Total Skipped: \(.totalSkipped)"
'
else
echo "No test results found!"
ls -la test/results/ || echo "Results directory doesn't exist"
fi