99 continue-on-error : ${{ matrix.experimental }}
1010
1111 strategy :
12- fail-fast : false
13- matrix :
14- php-version : ['7.4', '8.0', '8.1','8.2']
12+ fail-fast : false
13+ matrix :
14+ php-version : ['7.4', '8.0', '8.1', '8.2']
1515 experimental : [false]
1616 include :
17- - php-version : 8.3
17+ - php-version : ' 8.3'
1818 experimental : true
1919
2020 steps :
21- - uses : actions/checkout@v2
21+ - uses : actions/checkout@v3
2222
2323 - name : Set up PHP ${{ matrix.php-version }}
2424 uses : shivammathur/setup-php@v2
@@ -29,24 +29,17 @@ jobs:
2929
3030 - name : Setup Packages
3131 run : |
32- cd $GITHUB_WORKSPACE
3332 sudo apt update
34- sudo apt install rsync
35-
36- # - name: Cache Composer dependencies
37- # uses: actions/cache@v2
38- # with:
39- # path: /tmp/composer-cache
40- # key: ${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
33+ sudo apt install -y rsync
4134
4235 - name : Install dependencies
4336 uses : php-actions/composer@v6
4437 with :
4538 dev : yes
4639 args : --prefer-dist --no-interaction
4740 php_version : ${{ matrix.php-version }}
48- php_extensions : xml
49- version : 2
41+ php_extensions : xml
42+ continue-on-error : ${{ matrix.experimental }}
5043
5144 - name : Report Versions
5245 run : |
@@ -61,69 +54,75 @@ jobs:
6154 vendor/bin/behat -V
6255 mysql --version
6356 mysqladmin --version
57+ continue-on-error : ${{ matrix.experimental }}
6458
6559 - name : Create Database
6660 run : |
6761 sudo systemctl start mysql.service
68- sudo mysql -proot -e 'drop database if exists phplistdb'
62+ sudo mysql -proot -e 'DROP DATABASE IF EXISTS phplistdb'
6963 sudo mysqladmin -proot create phplistdb
70- sudo mysql -proot -e 'create user phplist@"%" identified by "phplist"; grant all on phplistdb.* to phplist@"%"'
64+ sudo mysql -proot -e 'CREATE USER phplist@"%" IDENTIFIED BY "phplist"; GRANT ALL ON phplistdb.* TO phplist@"%"'
65+ continue-on-error : ${{ matrix.experimental }}
7166
72- - name : Set bootlist theme
67+ - name : Set Bootlist Theme
7368 run : |
74- cd $GITHUB_WORKSPACE/ public_html/lists/admin/ui/
69+ cd public_html/lists/admin/ui/
7570 wget https://github.com/phpList/phplist-ui-bootlist/archive/master.tar.gz
7671 tar -xzf master.tar.gz
7772 mv phplist-ui-bootlist-master phplist-ui-bootlist
7873 rm master.tar.gz
74+ continue-on-error : ${{ matrix.experimental }}
7975
8076 - name : Start Test Server
8177 run : |
82- cd $GITHUB_WORKSPACE
8378 cp -fv tests/ci/behat.yml tests/behat.yml
8479 cp -fv tests/ci/config.php public_html/lists/config/config.php
8580 mkdir -p output/screenshots
86- touch output/screenshots/README.md
8781 mkdir -p build/mails
8882 ./bin/start-selenium > output/selenium.log 2>&1 &
8983 sleep 5
9084 sudo php -S 0.0.0.0:80 -t public_html > /dev/null 2>&1 &
85+ continue-on-error : ${{ matrix.experimental }}
9186
9287 - name : Check PHP syntax errors
93889489 with :
9590 path : ./public_html
96-
91+ continue-on-error : ${{ matrix.experimental }}
92+
9793 - name : Run BDD Tests UI
9894 run : |
99- cd $GITHUB_WORKSPACE/ tests
95+ cd tests
10096 ../vendor/bin/behat -p chrome -f progress --stop-on-failure --tags=@initialise
10197 ../vendor/bin/behat -p chrome -f progress --tags="~@initialise && ~@wip"
98+ continue-on-error : ${{ matrix.experimental }}
10299
103100 - name : Run BDD Tests CLI
104101 run : |
105- cd $GITHUB_WORKSPACE
106102107103 export ADMIN_PASSWORD=Mypassword123+
108104 export ORGANISATION_NAME="phpList"
109105 export ADMIN_NAME="phpList Administrator"
110- php public_html/lists/admin/index.php -c $GITHUB_WORKSPACE/ public_html/lists/config/config.php -p initialise -f
111- cd $GITHUB_WORKSPACE/ tests
106+ php public_html/lists/admin/index.php -c public_html/lists/config/config.php -p initialise -f
107+ cd tests
112108 ../vendor/bin/behat -p chrome --tags="~@initialise && ~@wip"
109+ continue-on-error : ${{ matrix.experimental }}
110+
111+ - name : Handle Experimental Warnings
112+ if : ${{ matrix.experimental && failure() }}
113+ run : |
114+ echo "::warning::PHP ${matrix.php-version} tests failed. This is marked as experimental and does not impact overall workflow success."
113115
114- - name : Upload the screenshots
116+ - name : Upload the Screenshots
115117 if : always()
116- uses : actions/upload-artifact@v2
118+ uses : actions/upload-artifact@v3
117119 with :
118120 path : " output"
119121 name : " behat output ${{ matrix.php-version }}"
120122 retention-days : 3
121123
122- - name : Display output
124+ - name : Display Output on Failure
125+ if : failure() && !matrix.experimental
123126 run : |
124- cd $GITHUB_WORKSPACE
125- # find . -type f
126- # cat output/selenium.log
127- if : ${{ failure() }}
128-
129-
127+ find . -type f
128+ cat output/selenium.log
0 commit comments