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
Add new "Check the label 'Needs autoupgrade PR'" workflow #36100
Add new "Check the label 'Needs autoupgrade PR'" workflow #36100
Conversation
M0rgan01
commented
May 6, 2024
•
edited
edited
Questions | Answers |
---|---|
Branch? | develop |
Description? | Added a new workflow to automatically add the "needs autoupgrade PR" label to know if a modification of the database structure has been detected. The workflow allows you to remove the label automatically if not necessary. The process is very fast (less than 2 mins) and is not blocking an PR. This is to inform contributors as well as reviewers that a PR will have to be made on the autoupgrade module. |
Type? | improvement |
Category? | PM |
BC breaks? | no |
Deprecations? | no |
How to test? | Create a branch from it, make modifications to the database structure (db_structure.sql file or entities) and create a PR to the starting branch to trigger the CI (example here M0rgan01#14) |
UI Tests | - |
Fixed issue or discussion? | - |
Related PRs | - |
Sponsor company | - |
28af954
to
0c31fc3
Compare
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.
All see good for me just a little suggestion about refacto
name: Install Prestashop and create database dump for base branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Docker build | ||
run: docker compose build prestashop-git | ||
|
||
- name: Build dependency | ||
run: docker compose run --rm prestashop-git composer install --ansi --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Create base database | ||
run: docker compose run --rm mysql mysql -hmysql -uroot -pprestashop -e "CREATE DATABASE presta_base;" | ||
|
||
- name: Install shop | ||
run: docker compose run --rm prestashop-git php install-dev/index_cli.php \ | ||
--step=database --db_server=mysql:3306 --db_name=presta_base --db_user=root --db_password=prestashop --prefix=ps_ --db_clear=1 \ | ||
--domain=localhost:8001 --firstname="Marc" --lastname="Beier" \ | ||
--password=Toto123! --email=demo@prestashop.com --language=fr --country=fr \ | ||
--newsletter=0 --send_email=0 --ssl=0 | ||
|
||
- name: Export dump | ||
run: docker compose run --rm mysql sh -c "exec mysqldump -hmysql -uroot --no-data --compact -pprestashop presta_base" > dump_base.sql | ||
|
||
- name: Upload dump | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dump_base | ||
path: | | ||
dump_base.sql |
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 we can refacto this part to not duplicate it and juste use reusable workflow with params. What do you think ?
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.
Are you thinking of a matrix ? totally possible
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 thought about using an action at first, but I guess a matrix would probably do the job better
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.
Although I wouldn't block the PR just for this so it's up to you
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.
Thanks @M0rgan01
b4388dd
b4388dd
to
c88d864
Compare
6c68fcc
to
d8b5240
Compare
d8b5240
to
2efab66
Compare
34c97eb
to
da81440
Compare
da81440
to
e012f45
Compare
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.
Thanks @M0rgan01