-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add End to End tests on GitHub CI #1584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the indentation use 4 spaces?
|
||
- name: Install Symfony CLI | ||
run: | | ||
wget https://get.symfony.com/cli/installer -O - | bash | ||
echo "$HOME/.symfony*/bin" >> $GITHUB_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Install Symfony CLI | |
run: | | |
wget https://get.symfony.com/cli/installer -O - | bash | |
echo "$HOME/.symfony*/bin" >> $GITHUB_PATH | |
tools: symfony |
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.4' | ||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the intention to have only these extensions installed? Then 'none' should be added:
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite | |
extensions: none, ctype, iconv, intl, mbstring, pdo_sqlite, xml |
- name: Test application | ||
working-directory: ./symfony_cli_test | ||
run: | | ||
php bin/console --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
php bin/console --version | |
php bin/console about |
run: | | ||
working-directory: ./composer_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run: | | |
working-directory: ./composer_test | |
working-directory: ./composer_test | |
run: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you missed this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Sorry. Fixed! Thanks.
Jan, thanks for the review! I added all your fixes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be oke with 2 spaces indentation for workflow files, but I guess for now we should follow the current CS of 4 spaces.
schedule: | ||
# run daily at 2:00 AM UTC | ||
- cron: '0 2 * * *' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
schedule: | |
# run daily at 2:00 AM UTC | |
- cron: '0 2 * * *' | |
schedule: | |
# run daily at 2:00 AM UTC | |
- cron: '0 2 * * *' | |
script: | | ||
const title = `End to End Test Failed - ${new Date().toISOString().split('T')[0]}`; | ||
const body = ` | ||
The daily end to end test workflow has failed. This means users may be experiencing issues installing the Symfony Demo application. | ||
|
||
**Failed Jobs:** | ||
- Check the workflow run for details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
||
**Installation Methods Tested:** | ||
- Symfony CLI installation | ||
- Composer create-project | ||
- Git clone + composer install | ||
|
||
Please investigate and fix the installation issues as soon as possible. | ||
`; | ||
|
||
github.rest.issues.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
title: title, | ||
body: body, | ||
labels: ['bug'] | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script: | | |
const title = `End to End Test Failed - ${new Date().toISOString().split('T')[0]}`; | |
const body = ` | |
The daily end to end test workflow has failed. This means users may be experiencing issues installing the Symfony Demo application. | |
**Failed Jobs:** | |
- Check the workflow run for details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
**Installation Methods Tested:** | |
- Symfony CLI installation | |
- Composer create-project | |
- Git clone + composer install | |
Please investigate and fix the installation issues as soon as possible. | |
`; | |
github.rest.issues.create({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
title: title, | |
body: body, | |
labels: ['bug'] | |
}); | |
script: | | |
const title = `End to End Test Failed - ${new Date().toISOString().split('T')[0]}`; | |
const body = ` | |
The daily end to end test workflow has failed. This means users may be experiencing issues installing the Symfony Demo application. | |
**Failed Jobs:** | |
- Check the workflow run for details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
**Installation Methods Tested:** | |
- Symfony CLI installation | |
- Composer create-project | |
- Git clone + composer install | |
Please investigate and fix the installation issues as soon as possible. | |
`; | |
github.rest.issues.create({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
title: title, | |
body: body, | |
labels: ['bug'] | |
}); |
f0f3886
to
2706f79
Compare
To avoid issues in the future, I propose to add a daily test that checks that this application is installable and works using different methods: Symfony CLI, Composer and Git clone.