@@ -33,39 +33,40 @@ jobs:
3333 # We use a mix of SBCL and GCL.
3434 include :
3535 - php : ' 8.4'
36- moodle-branch : ' main '
36+ moodle-branch : ' MOODLE_502_STABLE '
3737 database : ' pgsql'
3838 maxima : ' GCL'
39- moodle-app : true
39+ moodle-app : false
4040 - php : ' 8.4'
4141 moodle-branch : ' MOODLE_501_STABLE'
4242 database : ' pgsql'
43- maxima : ' GCL '
44- moodle-app : true
43+ maxima : ' SBCL '
44+ moodle-app : false
4545 - php : ' 8.2'
4646 moodle-branch : ' MOODLE_500_STABLE'
4747 database : ' pgsql'
4848 maxima : ' SBCL'
49- moodle-app : true
49+ moodle-app : false
5050 # Edinburgh is planning to run the setup below for 2025-26.
5151 - php : ' 8.2'
5252 moodle-branch : ' MOODLE_405_STABLE'
5353 database : ' mariadb'
5454 maxima : ' GCL'
55- moodle-app : true
56- - php : ' 7.4'
57- moodle-branch : ' MOODLE_401_STABLE'
55+ moodle-app : false
56+ # Note, Moodle 4.2 will run on PHP 8.0, but we require PHP 8.1 or newer.
57+ - php : ' 8.1'
58+ moodle-branch : ' MOODLE_402_STABLE'
5859 database : ' pgsql'
5960 maxima : ' GCL'
60- moodle-app : true
61+ moodle-app : false
6162
6263 steps :
6364 - name : Install Maxima (${{ matrix.maxima }})
6465 run : |
6566 maxima="${{ (matrix.maxima == 'SBCL' && 'sbcl') || 'gcl' }}"
6667 wget http://mirrors.kernel.org/ubuntu/pool/main/r/readline/libreadline7_7.0-3_amd64.deb \
67- https://sourceforge.net/projects/maxima/files/Maxima-Linux/5.42.2-Linux/maxima-common_5.42.2-1_all.deb \
68- https://sourceforge.net/projects/maxima/files/Maxima-Linux/5.42.2-Linux/maxima-${maxima}_5.42.2-1_amd64.deb
68+ https://sourceforge.net/projects/maxima/files/Maxima-Linux-RPM /5.42.2-Linux/maxima-common_5.42.2-1_all.deb \
69+ https://sourceforge.net/projects/maxima/files/Maxima-Linux-RPM /5.42.2-Linux/maxima-${maxima}_5.42.2-1_amd64.deb
6970
7071 sudo locale-gen en_AU.UTF-8
7172 sudo apt-get install libtinfo5
@@ -119,11 +120,13 @@ jobs:
119120 sudo locale-gen en_AU.UTF-8
120121 echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
121122
122- - name : Install moodle-plugin-ci
123+ - name : Install moodle-plugin-ci (full unit tests)
124+ if : ${{ matrix.moodle-branch == 'main' }}
123125 run : |
124126 moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfexplicitvaildate
125127 moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfcbmexplicitvaildate
126128 moodle-plugin-ci add-plugin maths/moodle-qbehaviour_adaptivemultipart
129+ moodle-plugin-ci add-plugin maths/moodle-qbank_importasversion
127130
128131 moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
129132
@@ -145,57 +148,123 @@ jobs:
145148 # Try a command on the command line.
146149 # echo "1+1; quit();" | timeout --kill-after=100s 100s ${{ github.workspace }}/maxima_opt_auto -eval '(cl-user::run)'
147150
151+ env :
152+ DB : ${{ matrix.database }}
153+ MOODLE_BRANCH : ${{ matrix.moodle-branch }}
154+
155+ - name : Install moodle-plugin-ci (light unit tests & moodle app)
156+ if : ${{ matrix.moodle-branch != 'main' && matrix.moodle-app == true}}
157+ run : |
158+ moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfexplicitvaildate
159+ moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfcbmexplicitvaildate
160+ moodle-plugin-ci add-plugin maths/moodle-qbehaviour_adaptivemultipart
161+ moodle-plugin-ci add-plugin maths/moodle-qbank_importasversion
162+
163+ moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
164+
165+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMAVERSION", "5.42.2");'
166+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMACOMMAND", "maxima");'
167+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMACOMMANDOPT", "timeout --kill-after=10s 10s ${{ github.workspace }}/maxima_opt_auto -eval '\''(cl-user::run)'\''");'
168+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMACOMMANDSERVER", "http://pool.home:8080/MaximaPool/MaximaPool");'
169+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASTIMEOUT", "100");'
170+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMALIBRARIES", "stats, distrib, descriptive, simplex");'
171+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASPREPARSE", "true");'
172+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_PLATFORM", "linux-optimised");'
173+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASRESULTSCACHE", "db");'
174+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_PLOTCOMMAND", "");'
175+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASDEBUGGING", "0");'
176+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CI_LIGHT", "1");'
177+
178+ #cat ${{ github.workspace }}/moodle/config.php
179+
180+ cp ${{ github.workspace }}/moodledata/phpu_moodledata/stack/maxima_opt_auto ${{ github.workspace }}/maxima_opt_auto
181+ # Try a command on the command line.
182+ # echo "1+1; quit();" | timeout --kill-after=100s 100s ${{ github.workspace }}/maxima_opt_auto -eval '(cl-user::run)'
183+
184+ env :
185+ DB : ${{ matrix.database }}
186+ MOODLE_BRANCH : ${{ matrix.moodle-branch }}
187+ MOODLE_APP : ' true'
188+
189+ - name : Install moodle-plugin-ci (light unit tests & no moodle app)
190+ if : ${{ matrix.moodle-branch != 'main' && matrix.moodle-app != true}}
191+ run : |
192+ moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfexplicitvaildate
193+ moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfcbmexplicitvaildate
194+ moodle-plugin-ci add-plugin maths/moodle-qbehaviour_adaptivemultipart
195+ moodle-plugin-ci add-plugin maths/moodle-qbank_importasversion
196+
197+ moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
198+
199+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMAVERSION", "5.42.2");'
200+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMACOMMAND", "maxima");'
201+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMACOMMANDOPT", "timeout --kill-after=10s 10s ${{ github.workspace }}/maxima_opt_auto -eval '\''(cl-user::run)'\''");'
202+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMACOMMANDSERVER", "http://pool.home:8080/MaximaPool/MaximaPool");'
203+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASTIMEOUT", "100");'
204+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMALIBRARIES", "stats, distrib, descriptive, simplex");'
205+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASPREPARSE", "true");'
206+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_PLATFORM", "linux-optimised");'
207+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASRESULTSCACHE", "db");'
208+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_PLOTCOMMAND", "");'
209+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASDEBUGGING", "0");'
210+ moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CI_LIGHT", "1");'
211+
212+ #cat ${{ github.workspace }}/moodle/config.php
213+
214+ cp ${{ github.workspace }}/moodledata/phpu_moodledata/stack/maxima_opt_auto ${{ github.workspace }}/maxima_opt_auto
215+ # Try a command on the command line.
216+ # echo "1+1; quit();" | timeout --kill-after=100s 100s ${{ github.workspace }}/maxima_opt_auto -eval '(cl-user::run)'
148217
149218 env :
150219 DB : ${{ matrix.database }}
151220 MOODLE_BRANCH : ${{ matrix.moodle-branch }}
152- MOODLE_APP : ${{ matrix.moodle-app }}
153221
154222 - name : PHP Lint
155- if : ${{ always() }}
223+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
156224 run : moodle-plugin-ci phplint
157225
158226 - name : PHP Copy/Paste Detector
159227 continue-on-error : true # This step will show errors but will not fail.
160- if : ${{ always() }}
228+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
161229 run : moodle-plugin-ci phpcpd
162230
163231 - name : PHP Mess Detector
164232 continue-on-error : true # This step will show errors but will not fail.
165- if : ${{ always() }}
233+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
166234 run : moodle-plugin-ci phpmd
167235
168236 - name : Moodle Code Checker
169237 continue-on-error : true # Currently fails. We really ought to get this passing.
170- if : ${{ always() }}
238+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
171239 run : moodle-plugin-ci codechecker --max-warnings 0
172240
173241 - name : Moodle PHPDoc Checker
174242 continue-on-error : true # Currently fails. We really ought to get this passing.
175- if : ${{ always() }}
243+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
176244 run : moodle-plugin-ci phpdoc
177245
178246 - name : Validating
179- if : ${{ always() }}
247+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
180248 run : moodle-plugin-ci validate
181249
182250 - name : Check upgrade savepoints
183- if : ${{ always() }}
251+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
184252 run : moodle-plugin-ci savepoints
185253
186254 - name : Mustache Lint
187- if : ${{ always() }}
255+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
188256 run : moodle-plugin-ci mustache
189257
190258 - name : Grunt
191- if : ${{ matrix.moodle-branch == 'MOODLE_500_STABLE' }}
259+ if : ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_502_STABLE' }}
192260 run : moodle-plugin-ci grunt
193261
194262 - name : PHPUnit tests
263+ # if: ${{ matrix.moodle-branch == 'main' || matrix.moodle-branch == 'MOODLE_405_STABLE'}}
195264 if : ${{ always() }}
196265 run : moodle-plugin-ci phpunit
197266
198267 - name : Behat features
199268 if : ${{ always() }}
200- run : moodle-plugin-ci behat --profile chrome --auto-rerun 6
269+ run : moodle-plugin-ci behat --profile chrome --auto-rerun 12
201270
0 commit comments