9
9
continue-on-error : ${{ matrix.experimental }}
10
10
11
11
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']
15
15
experimental : [false]
16
16
include :
17
- - php-version : 8.3
17
+ - php-version : ' 8.3'
18
18
experimental : true
19
19
20
20
steps :
21
- - uses : actions/checkout@v2
21
+ - uses : actions/checkout@v3
22
22
23
23
- name : Set up PHP ${{ matrix.php-version }}
24
24
uses : shivammathur/setup-php@v2
@@ -29,24 +29,17 @@ jobs:
29
29
30
30
- name : Setup Packages
31
31
run : |
32
- cd $GITHUB_WORKSPACE
33
32
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
41
34
42
35
- name : Install dependencies
43
36
uses : php-actions/composer@v6
44
37
with :
45
38
dev : yes
46
39
args : --prefer-dist --no-interaction
47
40
php_version : ${{ matrix.php-version }}
48
- php_extensions : xml
49
- version : 2
41
+ php_extensions : xml
42
+ continue-on-error : ${{ matrix.experimental }}
50
43
51
44
- name : Report Versions
52
45
run : |
@@ -61,69 +54,75 @@ jobs:
61
54
vendor/bin/behat -V
62
55
mysql --version
63
56
mysqladmin --version
57
+ continue-on-error : ${{ matrix.experimental }}
64
58
65
59
- name : Create Database
66
60
run : |
67
61
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'
69
63
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 }}
71
66
72
- - name : Set bootlist theme
67
+ - name : Set Bootlist Theme
73
68
run : |
74
- cd $GITHUB_WORKSPACE/ public_html/lists/admin/ui/
69
+ cd public_html/lists/admin/ui/
75
70
wget https://github.com/phpList/phplist-ui-bootlist/archive/master.tar.gz
76
71
tar -xzf master.tar.gz
77
72
mv phplist-ui-bootlist-master phplist-ui-bootlist
78
73
rm master.tar.gz
74
+ continue-on-error : ${{ matrix.experimental }}
79
75
80
76
- name : Start Test Server
81
77
run : |
82
- cd $GITHUB_WORKSPACE
83
78
cp -fv tests/ci/behat.yml tests/behat.yml
84
79
cp -fv tests/ci/config.php public_html/lists/config/config.php
85
80
mkdir -p output/screenshots
86
- touch output/screenshots/README.md
87
81
mkdir -p build/mails
88
82
./bin/start-selenium > output/selenium.log 2>&1 &
89
83
sleep 5
90
84
sudo php -S 0.0.0.0:80 -t public_html > /dev/null 2>&1 &
85
+ continue-on-error : ${{ matrix.experimental }}
91
86
92
87
- name : Check PHP syntax errors
93
88
94
89
with :
95
90
path : ./public_html
96
-
91
+ continue-on-error : ${{ matrix.experimental }}
92
+
97
93
- name : Run BDD Tests UI
98
94
run : |
99
- cd $GITHUB_WORKSPACE/ tests
95
+ cd tests
100
96
../vendor/bin/behat -p chrome -f progress --stop-on-failure --tags=@initialise
101
97
../vendor/bin/behat -p chrome -f progress --tags="~@initialise && ~@wip"
98
+ continue-on-error : ${{ matrix.experimental }}
102
99
103
100
- name : Run BDD Tests CLI
104
101
run : |
105
- cd $GITHUB_WORKSPACE
106
102
107
103
export ADMIN_PASSWORD=Mypassword123+
108
104
export ORGANISATION_NAME="phpList"
109
105
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
112
108
../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."
113
115
114
- - name : Upload the screenshots
116
+ - name : Upload the Screenshots
115
117
if : always()
116
- uses : actions/upload-artifact@v2
118
+ uses : actions/upload-artifact@v3
117
119
with :
118
120
path : " output"
119
121
name : " behat output ${{ matrix.php-version }}"
120
122
retention-days : 3
121
123
122
- - name : Display output
124
+ - name : Display Output on Failure
125
+ if : failure() && !matrix.experimental
123
126
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