Skip to content

Commit 4970f77

Browse files
authored
Merge pull request #7 from coldbox-modules/ci/addBoxlangToMatrix
Ci/add boxlang to matrix
2 parents 83f8d09 + 2cc8d58 commit 4970f77

9 files changed

+177
-13
lines changed

.cfconfig.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"adminPassword" : "coldbox",
3+
"componentCacheEnabled":false,
4+
"postParametersLimit" : 200,
5+
"robustExceptionEnabled":true,
6+
"saveClassFiles":false,
7+
"systemErr":"System",
8+
"systemOut":"System",
9+
"thistimezone":"UTC",
10+
"whitespaceManagement":"white-space-pref",
11+
"debuggingEnabled":true,
12+
"debuggingReportExecutionTimes":false,
13+
"disableInternalCFJavaComponents":false,
14+
"inspectTemplate":"always",
15+
"requestTimeout":"0,0,0,90",
16+
"datasources":{
17+
"twilio-sdk":{
18+
"bundleName": "${DB_BUNDLENAME}",
19+
"bundleVersion": "${DB_BUNDLEVERSION}",
20+
"blob":"true",
21+
"class":"${DB_CLASS}",
22+
"clob":"true",
23+
"connectionLimit":"100",
24+
"connectionTimeout":"1",
25+
"custom":"useUnicode=true&characterEncoding=UTF8&serverTimezone=UTC&useLegacyDatetimeCode=true&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true",
26+
"database":"twilio-sdk",
27+
"dbdriver":"MySQL",
28+
"dsn":"jdbc:mysql://{host}:{port}/{database}",
29+
"host":"${DB_HOST:127.0.0.1}",
30+
"metaCacheTimeout":"60000",
31+
"password":"${DB_PASSWORD}",
32+
"port": "${DB_PORT:3306}",
33+
"storage":"false",
34+
"username": "${DB_USER:root}",
35+
"validate":"false"
36+
}
37+
}
38+
}

.github/workflows/tests.yml

+18-10
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ jobs:
2222
env:
2323
DB_USER: root
2424
DB_PASSWORD: root
25+
continue-on-error: ${{ matrix.experimental }}
2526
strategy:
2627
fail-fast: false
2728
matrix:
2829
cfengine: [ "lucee@5", "lucee@6", "adobe@2021", "adobe@2023" ]
30+
coldboxVersion: [ "^6.0.0", "^7.0.0"]
31+
experimental: [ false ]
32+
include:
33+
- coldboxVersion: "be"
34+
cfengine: "boxlang@1"
35+
experimental: true
2936
steps:
3037
- name: Checkout Repository
3138
uses: actions/checkout@v2
@@ -73,6 +80,7 @@ jobs:
7380
7481
- name: Install Test Harness Dependencies
7582
run: |
83+
box package set dependencies.coldbox=${{ matrix.coldboxVersion }}
7684
box install
7785
7886
- name: Start ${{ matrix.cfengine }} Server
@@ -82,12 +90,12 @@ jobs:
8290
TWILIO_TEST_ACCOUNT_SID: ${{ secrets.TWILIO_TEST_ACCOUNT_SID }}
8391
TWILIO_TEST_AUTHTOKEN: ${{ secrets.TWILIO_TEST_AUTHTOKEN }}
8492
run: |
85-
box server start cfengine=${{ matrix.cfengine }} port=49619 --noSaveSettings --debug
93+
box server start serverConfigFile=server-${{ matrix.cfengine }}.json --noSaveSettings --debug
8694
# Install Adobe 2021 cfpm modules
8795
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
8896
box run-script install:2021
8997
fi
90-
curl http://127.0.0.1:49619
98+
curl http://127.0.0.1:60299
9199
92100
- name: Run Tests
93101
env:
@@ -100,17 +108,17 @@ jobs:
100108
box testbox run --verbose outputFile=tests/results/test-results outputFormats=json,antjunit
101109
102110
- name: Publish Test Results
103-
uses: EnricoMi/publish-unit-test-result-action@v1
111+
uses: EnricoMi/publish-unit-test-result-action@v2
104112
if: always()
105113
with:
106-
files: tests/results/**/*.xml
107-
check_name: "${{ matrix.cfengine }} Test Results"
114+
junit_files: tests/results/**/*.xml
115+
check_name: "${{ matrix.cfengine }} ColdBox ${{ matrix.coldboxVersion }} Test Results"
108116

109117
- name: Upload Test Results to Artifacts
110118
if: always()
111-
uses: actions/upload-artifact@v2
119+
uses: actions/upload-artifact@v4.4.3
112120
with:
113-
name: test-results-${{ matrix.cfengine }}
121+
name: test-results-${{ matrix.cfengine }}-${{ matrix.coldboxVersion }}
114122
path: |
115123
tests/results/**/*
116124
@@ -121,9 +129,9 @@ jobs:
121129
122130
- name: Upload Debug Logs To Artifacts
123131
if: ${{ failure() }}
124-
uses: actions/upload-artifact@v2
132+
uses: actions/upload-artifact@v4.4.3
125133
with:
126-
name: Failure Debugging Info - ${{ matrix.cfengine }}
134+
name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.coldboxVersion }}
127135
path: |
128136
.engine/**/logs/*
129137
.engine/**/WEB-INF/cfusion/logs/*
@@ -137,6 +145,6 @@ jobs:
137145
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
138146
SLACK_ICON_EMOJI: ":bell:"
139147
SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:'
140-
SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} failed
148+
SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} with ColdBox ${{ matrix.coldboxVersion }} failed
141149
SLACK_USERNAME: CI
142150
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

models/TwilioClient.cfc

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ component singleton accessors="true" {
8181
function getSMS( required string sid ) {
8282
return newRequest()
8383
.setMethod( "GET" )
84-
.setUrl( "/Accounts/#variables.accountSID#/Messages/#arguments.sid#.json")
84+
.setUrl( "/Accounts/#variables.accountSID#/Messages/#arguments.sid#.json" )
8585
}
8686

8787
/**

[email protected]

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name":"twilio-sdk-adobe@2021",
3+
"app":{
4+
"serverHomeDirectory":".engine/adobe2021",
5+
"cfengine":"adobe@2021"
6+
},
7+
"web":{
8+
"http":{
9+
"port":"60299"
10+
},
11+
"rewrites":{
12+
"enable":"true"
13+
},
14+
"webroot":"./",
15+
"aliases":{
16+
"/moduleroot/twilio-sdk":"./"
17+
}
18+
},
19+
"jvm":{
20+
"heapSize":"1024"
21+
},
22+
"openBrowser":"false",
23+
"cfconfig":{
24+
"file":".cfconfig.json"
25+
},
26+
"scripts":{
27+
"onServerInstall":"cfpm install zip,debugger,mysql"
28+
}
29+
}

[email protected]

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name":"twilio-sdk-adobe@2023",
3+
"app":{
4+
"serverHomeDirectory":".engine/adobe2023",
5+
"cfengine":"adobe@2023"
6+
},
7+
"web":{
8+
"http":{
9+
"port":"60299"
10+
},
11+
"rewrites":{
12+
"enable":"true"
13+
},
14+
"webroot":"./",
15+
"aliases":{
16+
"/moduleroot/twilio-sdk":"./"
17+
}
18+
},
19+
"jvm":{
20+
"heapSize":"1024"
21+
},
22+
"openBrowser":"false",
23+
"cfconfig":{
24+
"file":".cfconfig.json"
25+
},
26+
"scripts":{
27+
"onServerInstall":"cfpm install zip,debugger,mysql"
28+
}
29+
}

[email protected]

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"app":{
3+
"cfengine":"boxlang@be",
4+
"serverHomeDirectory":".engine/boxlang"
5+
},
6+
"name":"twilio-sdk-boxlang@1",
7+
"force":true,
8+
"openBrowser":false,
9+
"web":{
10+
"directoryBrowsing":true,
11+
"http":{
12+
"port":"60299"
13+
},
14+
"rewrites":{
15+
"enable":true
16+
},
17+
"webroot":".",
18+
"aliases":{
19+
"/moduleroot/twilio-sdk":"./"
20+
}
21+
},
22+
"JVM":{
23+
"heapSize":"1024",
24+
"javaVersion":"openjdk21_jdk",
25+
"args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999"
26+
},
27+
"cfconfig":{
28+
"file":".cfconfig.json"
29+
},
30+
"env":{
31+
"BOXLANG_DEBUG":true
32+
},
33+
"scripts":{
34+
"onServerInitialInstall":"install bx-mail,bx-mysql,bx-derby,bx-compat-cfml@be,bx-unsafe-evaluate,bx-esapi --noSave"
35+
}
36+
}

[email protected]

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"web":{
3+
"http":{
4+
"port":"60299"
5+
}
6+
},
7+
"app":{
8+
"cfengine":"lucee@5"
9+
}
10+
}

[email protected]

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"web":{
3+
"http":{
4+
"port":"60299"
5+
}
6+
},
7+
"app":{
8+
"cfengine":"lucee@6"
9+
}
10+
}

tests/specs/unit/SignatureTest.cfc

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ component extends="testbox.system.BaseSpec" {
1414
"Digits": "1234"
1515
};
1616
var expectedSignature = "GvWf1cFY/Q7PnoempGyD5oXAezc=";
17-
expect( validator.validate( expectedSignature, uri, formParams ) ).toBeTrue( "Signature should have validated correctly" );
17+
expect( validator.validate( expectedSignature, uri, formParams ) ).toBeTrue(
18+
"Signature should have validated correctly"
19+
);
1820
} );
1921

2022
it( "returns false for an invalid signature", function() {
@@ -29,7 +31,9 @@ component extends="testbox.system.BaseSpec" {
2931
"Digits": "1234"
3032
};
3133
var invalidSignature = "invalid";
32-
expect( validator.validate( invalidSignature, uri, formParams ) ).toBeFalse( "Signature should not have validated correctly" );
34+
expect( validator.validate( invalidSignature, uri, formParams ) ).toBeFalse(
35+
"Signature should not have validated correctly"
36+
);
3337
} );
3438
} );
3539
}

0 commit comments

Comments
 (0)