5
5
workflow_call :
6
6
secrets :
7
7
SLACK_WEBHOOK_URL :
8
- required : true
8
+ required : false
9
9
10
10
jobs :
11
11
tests :
@@ -14,67 +14,70 @@ jobs:
14
14
env :
15
15
DB_USER : root
16
16
DB_PASSWORD : root
17
+ continue-on-error : ${{ matrix.experimental }}
17
18
strategy :
18
19
fail-fast : false
19
20
matrix :
20
- cfengine : [ "lucee@5", "adobe@2016", "adobe@2018", "adobe@2021" ]
21
+ cfengine : [ "lucee@5", "adobe@2018", "adobe@2021" ]
22
+ coldboxVersion : [ "^6.0.0" ]
23
+ experimental : [ false ]
24
+ include :
25
+ - cfengine : " adobe@2023"
26
+ coldboxVersion : " ^6.0.0"
27
+ experimental : true
28
+ - coldboxVersion : " be"
29
+ cfengine : " lucee@5"
30
+ experimental : true
31
+ - coldboxVersion : " be"
32
+ cfengine : " adobe@2018"
33
+ experimental : true
34
+ - coldboxVersion : " be"
35
+ cfengine : " adobe@2021"
36
+ experimental : true
21
37
steps :
22
38
- name : Checkout Repository
23
- uses : actions/checkout@v2
39
+ uses : actions/checkout@v3
24
40
25
- # Not Needed in this module
26
- # - name: Setup Database and Fixtures
27
- # run: |
28
- # sudo /etc/init.d/mysql start
29
- # mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE coolblog;'
30
- # mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql
41
+ # - name: Setup Database and Fixtures
42
+ # run: |
43
+ # sudo systemctl start mysql.service
44
+ # mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE mementifier;'
45
+ # mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql
31
46
32
47
- name : Setup Java
33
- uses : actions/setup-java@v2
48
+ uses : actions/setup-java@v3
34
49
with :
35
- distribution : " adopt "
50
+ distribution : " temurin "
36
51
java-version : " 11"
37
52
38
53
- name : Setup CommandBox CLI
39
- uses : Ortus-Solutions/setup-commandbox@main
54
+ uses : Ortus-Solutions/setup-commandbox@v2.0.1
40
55
41
56
# Not Needed in this module
42
57
# - name: Setup Environment For Testing Process
43
- # working-directory: ./test-harness
44
58
# run: |
45
59
# # Setup .env
46
60
# touch .env
47
61
# # ENV
48
62
# printf "DB_HOST=localhost\n" >> .env
63
+ # printf "DB_DATABASE=mydatabase\n" >> .env
64
+ # printf "DB_DRIVER=MySQL\n" >> .env
49
65
# printf "DB_USER=${{ env.DB_USER }}\n" >> .env
50
66
# printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env
51
67
# printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env
52
68
# printf "DB_BUNDLEVERSION=8.0.19\n" >> .env
53
69
# printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env
54
70
55
- - name : Cache CommandBox Dependencies
56
- uses : actions/cache@v1
57
- if : ${{ true }}
58
- with :
59
- path : ~/.CommandBox/artifacts
60
- key : ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
61
- restore-keys : |
62
- ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
63
-
64
- - name : Install Dependencies
71
+ - name : Install Test Harness with ColdBox ${{ matrix.coldboxVersion }}
65
72
run : |
66
- # Root Dependencies
67
73
box install
68
- # Test Harness Dependencies
69
- cd test-harness && box install
74
+ cd test-harness
75
+ box package set dependencies.coldbox=${{ matrix.coldboxVersion }}
76
+ box install
70
77
71
78
- name : Start ${{ matrix.cfengine }} Server
72
79
run : |
73
80
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug
74
- # Install Adobe 2021 cfpm modules
75
- if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
76
- box run-script install:2021
77
- fi
78
81
curl http://127.0.0.1:60299
79
82
80
83
- name : Run Tests
@@ -83,17 +86,17 @@ jobs:
83
86
box testbox run --verbose outputFile=test-harness/tests/results/test-results outputFormats=json,antjunit
84
87
85
88
- name : Publish Test Results
86
- uses : EnricoMi/publish-unit-test-result-action@v1
89
+ uses : EnricoMi/publish-unit-test-result-action@v2
87
90
if : always()
88
91
with :
89
- files : test-harness/tests/results/**/*.xml
90
- check_name : " ${{ matrix.cfengine }} Test Results"
92
+ junit_files : test-harness/tests/results/**/*.xml
93
+ check_name : " ${{ matrix.cfengine }} ColdBox ${{ matrix.coldboxVersion }} Test Results"
91
94
92
95
- name : Upload Test Results to Artifacts
93
96
if : always()
94
- uses : actions/upload-artifact@v2
97
+ uses : actions/upload-artifact@v3
95
98
with :
96
- name : test-results-${{ matrix.cfengine }}
99
+ name : test-results-${{ matrix.cfengine }}-${{ matrix.coldboxVersion }}
97
100
path : |
98
101
test-harness/tests/results/**/*
99
102
@@ -104,9 +107,9 @@ jobs:
104
107
105
108
- name : Upload Debug Logs To Artifacts
106
109
if : ${{ failure() }}
107
- uses : actions/upload-artifact@v2
110
+ uses : actions/upload-artifact@v3
108
111
with :
109
- name : Failure Debugging Info - ${{ matrix.cfengine }}
112
+ name : Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.coldboxVersion }}
110
113
path : |
111
114
.engine/**/logs/*
112
115
.engine/**/WEB-INF/cfusion/logs/*
@@ -120,6 +123,6 @@ jobs:
120
123
SLACK_COLOR : ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
121
124
SLACK_ICON_EMOJI : " :bell:"
122
125
SLACK_MESSAGE : ' ${{ github.repository }} tests failed :cry:'
123
- SLACK_TITLE : ${{ github.repository }} Tests For ${{ matrix.cfengine }} failed
126
+ SLACK_TITLE : ${{ github.repository }} Tests For ${{ matrix.cfengine }} with ColdBox ${{ matrix.coldboxVersion }} failed
124
127
SLACK_USERNAME : CI
125
128
SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
0 commit comments