Skip to content
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

[ci] introduce mode: experimental flag #335

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
submodules: "true"

- name: Install PHP
- name: Install PHP ${{ matrix.php-version }} ${{ matrix.mode }}
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
Expand All @@ -59,4 +59,14 @@ jobs:
run: php data/bin/check_configuration.php

- name: Run Tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would continue-on-error work here as well? Maybe with something like

- name: Run Tests
  run: ...
  continue-on-error: ${{ matrix.mode == "experimental"}}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is possible that it works. Why didn't I find it in the documentation when I searched?

Copy link
Contributor

@mentalstring mentalstring Mar 19, 2024

Choose a reason for hiding this comment

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

I believe the continue-on-error will only make sure the other PHP versions still run and not abort as soon as one fails. But if one fails, the CI will still be marked as failed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's true! The status is also important here to keep the result green.

run: php data/bin/symfony symfony:test --trace
run: |
exit_status=0
php data/bin/symfony symfony:test --trace || exit_status=$?
if [ "${{ matrix.mode }}" = experimental ]
then
echo "exited: $exit_status"
exit 0
else
exit $exit_status
fi