Skip to content

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

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

javiereguiluz
Copy link
Member

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.

Copy link
Contributor

@rosier rosier left a 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?

Comment on lines 22 to 26

- name: Install Symfony CLI
run: |
wget https://get.symfony.com/cli/installer -O - | bash
echo "$HOME/.symfony*/bin" >> $GITHUB_PATH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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
Copy link
Contributor

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:

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
php bin/console --version
php bin/console about

Comment on lines 57 to 58
run: |
working-directory: ./composer_test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run: |
working-directory: ./composer_test
working-directory: ./composer_test
run: |

Copy link
Contributor

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

Copy link
Member Author

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.

@javiereguiluz
Copy link
Member Author

Jan, thanks for the review! I added all your fixes.

Copy link
Contributor

@rosier rosier left a 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.

Comment on lines 4 to 6
schedule:
# run daily at 2:00 AM UTC
- cron: '0 2 * * *'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
schedule:
# run daily at 2:00 AM UTC
- cron: '0 2 * * *'
schedule:
# run daily at 2:00 AM UTC
- cron: '0 2 * * *'

Comment on lines 97 to 119
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']
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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']
});

@javiereguiluz javiereguiluz merged commit 9ae133d into symfony:main Jul 28, 2025
3 checks passed
@javiereguiluz javiereguiluz deleted the end_to_end_test branch July 28, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants