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

[TASK] Move the unit tests from Travis CI to GitHub actions #846

Merged
merged 2 commits into from
Mar 28, 2020

Conversation

oliverklee
Copy link
Contributor

Removing the Travis CI integration will follow in a separate commit.

Part of #818

@oliverklee oliverklee added this to the 4.0.0 milestone Mar 27, 2020
@oliverklee oliverklee requested review from zoliszabo and JakeQZ March 27, 2020 13:45
@oliverklee oliverklee self-assigned this Mar 27, 2020
Removing the Travis CI integration will follow in a separate commit.

Part of #818.
Copy link
Contributor

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

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

Hope you, friends, family, etc. are OK.

This looks generally good, but I have a few questions in individual comments.

Comment on lines 140 to 142
if [[ "${{ matrix.dependencies }}" == 'lowest' ]]; then
DEPENDENCIES='--prefer-lowest';
fi;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be an else case to set DEPENDENCIES to an empty string otherwise, just in case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that would be cleaner. I'll update the PR accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

if [[ "${{ matrix.dependencies }}" == 'lowest' ]]; then
DEPENDENCIES='--prefer-lowest';
fi;
composer update --no-progress "${DEPENDENCIES}";
Copy link
Contributor

Choose a reason for hiding this comment

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

In #638 the --ignore-platform-reqs argument was added for PHP 7.3 (and later 7.4) because friendsofphp/php-cs-fixer did not explicitly support PHP 7.3. Although not needed by the unit tests, it's nonetheless a 'dev' dependency in composer.json. I'm guessing this is not required any more because PHP CS Fixer now supports the latest PHP versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly. (This kind of problem will go away once we've moved the tools from Composer dependencies to Phive.)

php${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-

- name: Install Composer dependencies
run: |
Copy link
Contributor

Choose a reason for hiding this comment

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

Might a composer install step be needed first, before composer update?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this is not required (and would slow down the process as we'd then potentially download two versions of some packages). update always includes the install (and for calculating the updates, Composer does not need any packages installed.)

uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-version }}
ini-values: xdebug.max_nesting_level=500
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this (we did not previously change the setting)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Without this setting, we'd get a "maximum nesting level reached" error in CssInlinerTest::inlineCssAppliesMoreSpecificCssSelectorToMatchingElements:
https://github.com/MyIntervals/emogrifier/runs/539483776?check_suite_focus=true

@JakeQZ JakeQZ merged commit f530ea3 into master Mar 28, 2020
@JakeQZ JakeQZ deleted the task/move-unit-tests branch March 28, 2020 18:24
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