61
61
- name : Test application
62
62
working-directory : ${{ github.job }}
63
63
run : |
64
+ rm -v .env.local
64
65
php bin/console about
65
66
symfony server:start -d --no-tls
66
67
curl --fail --max-time 5 --no-progress-meter --output home.html -v http://127.0.0.1:8000/
94
95
symfony server:stop
95
96
96
97
notify-on-failure :
97
- if : failure()
98
+ if : ${{ always() && contains(needs.*.result, 'failure') }}
98
99
name : Notify on Failure
99
100
needs : [test-symfony-cli-installation, test-composer-create-project, test-git-clone-installation]
100
101
runs-on : ubuntu-latest
@@ -105,25 +106,30 @@ jobs:
105
106
steps :
106
107
- name : Create Issue on Failure
107
108
uses : actions/github-script@v7
109
+ env :
110
+ NEEDS_CONTEXT : ${{ toJSON(needs) }}
108
111
with :
109
112
script : |
110
- const title = `End to End Test Failed - ${new Date().toISOString().split('T')[0]}`;
111
- const body = `The daily end to end test workflow has failed.
113
+ const needsContext = JSON.parse(process.env.NEEDS_CONTEXT);
114
+ const failedJobs = Object.keys(needsContext)
115
+ .filter(jobName => 'failure' === needsContext[jobName].result)
116
+ .map(jobName => `- **${needsContext[jobName].outputs.name || jobName}**: Failed`);
112
117
113
- This means users may be experiencing issues installing the Symfony Demo application.
118
+ const runUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`;
119
+ const title = `E2E Test Failure: ${new Date().toISOString().split('T')[0]}`;
120
+
121
+ const body = `
122
+ The daily end-to-end test workflow has failed.
114
123
115
- **Failed Jobs:**
116
- - Check the workflow run for details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
124
+ This means users may be experiencing issues installing the Symfony Demo application.
117
125
118
- **Installation Methods Tested:**
119
- - Symfony CLI installation
120
- - Composer create-project
121
- - Git clone + composer install
126
+ ### Failed Jobs:
127
+ ${failedJobs.join('\n')}
122
128
123
129
Please investigate and fix the installation issues as soon as possible.
124
130
`;
125
131
126
- github.rest.issues.create({
132
+ await github.rest.issues.create({
127
133
owner: context.repo.owner,
128
134
repo: context.repo.repo,
129
135
title: title,
0 commit comments