4
4
schedule :
5
5
# run daily at 2:00 AM UTC
6
6
- cron : ' 0 2 * * *'
7
- # allow manual triggering for testing purposes
8
- workflow_dispatch :
7
+
8
+ # allow manual triggering for testing purposes
9
+ workflow_dispatch :
10
+
11
+ permissions :
12
+ contents : read
9
13
10
14
jobs :
11
15
test-symfony-cli-installation :
@@ -16,21 +20,27 @@ jobs:
16
20
- name : Setup PHP
17
21
uses : shivammathur/setup-php@v2
18
22
with :
19
- php-version : ' 8.4'
20
- extensions : none, ctype, iconv, intl, mbstring, pdo_sqlite, xml
21
23
coverage : none
22
- tools : symfony
24
+ extensions : none, ctype, dom, iconv, intl, mbstring, pdo_sqlite, simplexml, tokenizer, xml, xmlwriter
25
+ php-version : ' 8.2'
26
+ tools : symfony-cli
23
27
24
- - name : Create project using Symfony CLI
28
+ - name : Configure environment
25
29
run : |
26
- symfony new --demo symfony_cli_test
30
+ git config --global init.defaultBranch main
31
+ git config --global user.email "[email protected] "
32
+ git config --global user.name "Symfony Demo"
33
+
34
+ - name : Create project using Symfony CLI
35
+ run : symfony new --demo ${{ github.job }}
27
36
28
37
- name : Test application
29
- working-directory : ./symfony_cli_test
38
+ working-directory : ${{ github.job }}
30
39
run : |
31
40
php bin/console about
32
- php bin/console list
33
- php bin/console cache:clear --env=test
41
+ symfony server:start -d --no-tls
42
+ curl --fail --max-time 5 --no-progress-meter --output home.html -v http://127.0.0.1:8000/
43
+ symfony server:stop
34
44
35
45
test-composer-create-project :
36
46
name : Test Composer Create Project
@@ -40,21 +50,22 @@ jobs:
40
50
- name : Setup PHP
41
51
uses : shivammathur/setup-php@v2
42
52
with :
43
- php-version : ' 8.4'
44
- extensions : none, ctype, iconv, intl, mbstring, pdo_sqlite, xml
45
- tools : composer
46
53
coverage : none
54
+ extensions : none, ctype, dom, iconv, intl, mbstring, pdo_sqlite, simplexml, tokenizer, xml, xmlwriter
55
+ php-version : latest
56
+ tools : symfony-cli
47
57
48
58
- name : Create project using Composer
49
- run : |
50
- composer create-project symfony/symfony-demo composer_test
59
+ run : composer create-project symfony/symfony-demo ${{ github.job }}
51
60
52
61
- name : Test application
53
- working-directory : ./composer_test
62
+ working-directory : ${{ github.job }}
54
63
run : |
64
+ rm -v .env.local
55
65
php bin/console about
56
- php bin/console list
57
- php bin/console cache:clear --env=test
66
+ symfony server:start -d --no-tls
67
+ curl --fail --max-time 5 --no-progress-meter --output home.html -v http://127.0.0.1:8000/
68
+ symfony server:stop
58
69
59
70
test-git-clone-installation :
60
71
name : Test Git Clone Installation
@@ -64,29 +75,31 @@ jobs:
64
75
- name : Setup PHP
65
76
uses : shivammathur/setup-php@v2
66
77
with :
67
- php-version : ' 8.4'
68
- extensions : none, ctype, iconv, intl, mbstring, pdo_sqlite, xml
69
- tools : composer
70
78
coverage : none
79
+ extensions : none, ctype, dom, iconv, intl, mbstring, pdo_sqlite, simplexml, tokenizer, xml, xmlwriter
80
+ php-version : ' 8.3'
81
+ tools : symfony-cli
71
82
72
83
- name : Clone repository and install dependencies
73
84
run : |
74
- git clone https://github.com/symfony/demo.git git_clone_test
75
- cd git_clone_test
76
- composer install --no-dev --optimize-autoloader
85
+ git clone https://github.com/symfony/demo.git ${{ github.job }}
86
+ cd ${{ github.job }}
87
+ composer install
77
88
78
89
- name : Test application
79
- working-directory : ./git_clone_test
90
+ working-directory : ${{ github.job }}
80
91
run : |
81
92
php bin/console about
82
- php bin/console list
83
- php bin/console cache:clear --env=test
93
+ symfony server:start -d --no-tls
94
+ curl --fail --max-time 5 --no-progress-meter --output home.html -v http://127.0.0.1:8000/
95
+ symfony server:stop
84
96
85
97
notify-on-failure :
98
+ if : failure()
86
99
name : Notify on Failure
87
- runs-on : ubuntu-latest
88
100
needs : [test-symfony-cli-installation, test-composer-create-project, test-git-clone-installation]
89
- if : failure()
101
+ runs-on : ubuntu-latest
102
+
90
103
permissions :
91
104
issues : write
92
105
@@ -96,18 +109,19 @@ jobs:
96
109
with :
97
110
script : |
98
111
const title = `End to End Test Failed - ${new Date().toISOString().split('T')[0]}`;
99
- const body = `
100
- The daily end to end test workflow has failed. This means users may be experiencing issues installing the Symfony Demo application.
112
+ const body = `The daily end to end test workflow has failed.
113
+
114
+ This means users may be experiencing issues installing the Symfony Demo application.
101
115
102
- **Failed Jobs:**
103
- - Check the workflow run for details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
116
+ **Failed Jobs:**
117
+ - Check the workflow run for details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
104
118
105
- **Installation Methods Tested:**
106
- - Symfony CLI installation
107
- - Composer create-project
108
- - Git clone + composer install
119
+ **Installation Methods Tested:**
120
+ - Symfony CLI installation
121
+ - Composer create-project
122
+ - Git clone + composer install
109
123
110
- Please investigate and fix the installation issues as soon as possible.
124
+ Please investigate and fix the installation issues as soon as possible.
111
125
`;
112
126
113
127
github.rest.issues.create({
0 commit comments