Skip to content

Conversation

jakzal
Copy link
Contributor

@jakzal jakzal commented Apr 30, 2020

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
Tickets Fixes #36427
License MIT
Doc PR -
  • redis, memcached, rabbitmq and vulcain dependent tests moved to the github action
  • run on PHP 7.1 and 7.4 only
  • use the integration group for all tests that depend on docker services
  • do not exclude the integration group on Travis, but make sure tests that depend on docker services are skipped properly

image

@jakzal jakzal force-pushed the tests-on-github-actions branch 3 times, most recently from 0d0e2c1 to 52a84c5 Compare May 1, 2020 01:48
@Plopix Plopix mentioned this pull request May 1, 2020
17 tasks
@nicolas-grekas
Copy link
Member

Cool thanks.
I would suggest to target 4.4 for this. Docker on 3.4 is not really slowing us down. Then, on 4.4, I would suggest testing with only two versions: the lowest one (7.1) and the highest one. Adding more jobs wouldn't provide much extra safety, while it would slow the overall CI down. Let's save some CO² footprint.

@jakzal
Copy link
Contributor Author

jakzal commented May 1, 2020

@nicolas-grekas sounds good. Regarding 7.1 the phpunit run fails with:

Remaining indirect deprecation notices (1)

  1x: The Doctrine\Common\Persistence\Mapping\ClassMetadata class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\Mapping\ClassMetadata instead.

    1x in DoctrineOrmTypeGuesserTest::requiredProvider from Symfony\Bridge\Doctrine\Tests\Form

@nicolas-grekas
Copy link
Member

We skip a few deprecations by default:
https://github.com/symfony/symfony/blob/master/phpunit#L28

but the logic is this file doesn't reach this line currently.
We need to find a way to skip them in the new context.

(I wish Doctrine could fix its own deprecations, but that's another story...)

@jakzal jakzal force-pushed the tests-on-github-actions branch from 6f0c3bd to 8258cf9 Compare May 1, 2020 12:37
@jakzal jakzal requested review from dunglas, lyrixx, sroze and xabbuh as code owners May 1, 2020 12:37
@jakzal jakzal changed the base branch from 3.4 to 4.4 May 1, 2020 12:37
@jakzal jakzal changed the title POC: Execute redis tests with github actions Execute docker dependent tests with github actions May 1, 2020
@jakzal
Copy link
Contributor Author

jakzal commented May 1, 2020

Rebased against 4.4 and applied feedback:

  • run on PHP 7.1 and 7.4 only
  • redis, memcached, rabbitmq moved to the github action
  • use the integration group for all tests that depend on docker services
  • do not exclude the integration group on Travis, but make sure tests that depend on docker services are skipped properly

Left to do:

  • vulcain?
  • higher branches once this is merged

Turns out that nothing really depends on mongodb running. The only test I could find actually mocks it (MongoDbSessionHandlerTest). There's quite a lot of code in .travis.yml that dealing with the mongodb extension. There's something using it in the master branch.

@nicolas-grekas nicolas-grekas added this to the 4.4 milestone May 1, 2020
Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Im happy with this PR. I just had some minor comments

@jakzal jakzal force-pushed the tests-on-github-actions branch from 4c1cdde to d710c1b Compare May 4, 2020 11:11
@jakzal
Copy link
Contributor Author

jakzal commented May 4, 2020

@Nyholm thank you so much for the review.

Vulcain tests are now migrated. They're skipped on 4.4 however.

This PR is now ready for a final review & merge.

@jakzal
Copy link
Contributor Author

jakzal commented May 4, 2020

@nicolas-grekas it seems that some tests on Travis are failing, as they're not run against code in this branch? https://travis-ci.org/github/symfony/symfony/jobs/682876413#L8162

The same branch passes on my account: https://travis-ci.org/github/jakzal/symfony/builds/682876394

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

some tests on Travis are failing, as they're not run against code in this branch

Correct. This will be fixed once we've merged up.

@fabpot
Copy link
Member

fabpot commented May 4, 2020

Very impressive work @jakzal!

@fabpot
Copy link
Member

fabpot commented May 4, 2020

Thank you @jakzal.

@fabpot fabpot merged commit 0a7fa8f into symfony:4.4 May 4, 2020
@jakzal jakzal deleted the tests-on-github-actions branch May 4, 2020 12:50
@nicolas-grekas
Copy link
Member

@jakzal could you please have a look at master now?
I just merged 4.4 up to master and I removed integration tests from .travis.yml, but I did not add them back to the new system.

See this change:
1ae3e04#diff-354f30a63fb0907d4ad57269548329e3

We'd need to add tests for Messenger SQS, couchbase and kafka.

@jakzal
Copy link
Contributor Author

jakzal commented May 4, 2020

on it

nicolas-grekas added a commit that referenced this pull request May 4, 2020
…ns (jakzal)

This PR was merged into the 5.0 branch.

Discussion
----------

[5.0] Use PHP 7.2 minimum in tests run with github actions

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Re #36647
| License       | MIT
| Doc PR        | -

Commits
-------

8b386f2 Use PHP 7.2 minimum in tests run with github actions
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
Copy link
Contributor

Choose a reason for hiding this comment

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

there is no composer.lock in this repo.

nicolas-grekas added a commit that referenced this pull request May 5, 2020
…ranch (jakzal)

This PR was merged into the 5.1-dev branch.

Discussion
----------

Configure services additionally required by the master branch

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Re #36647
| License       | MIT
| Doc PR        | -

Additionally run tests for:

* couchbase
* sqs
* kafka
* mongodb (although currently skipped due to #36702)

Before: Tests: 1893, Assertions: 5178, Skipped: 105.
After: Tests: 2042, Assertions: 5407, Skipped: 120.

Commits
-------

dc7ac57 Configure services additionally required by the master branch
nicolas-grekas added a commit that referenced this pull request Jul 23, 2020
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock][Cache] Fix Redis tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | /
| License       | MIT
| Doc PR        | /

In branch 3.4, travis started a redis-server container and tests run correctly.

Starting from 4.4, the travis test suite don't start the server anymore, which is not an issue for 4.4's tests because tests are skiped.

The issue is when branch 4.4 run the 3.4's test suite to check if component changes in 4.4 does not affect 3.4. in that case, the 3.4 tests suite is run without redise-server.
see https://travis-ci.org/github/symfony/symfony/jobs/711062047 for example

This PR replace the error handler (didn't worked) by catching the exception in a similar way than #36647

Commits
-------

f524c85 Fix Redis tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants