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

Add support for test coverage tracking with Coveralls #101

Merged
merged 7 commits into from
Sep 3, 2020

Conversation

japerry
Copy link
Contributor

@japerry japerry commented Aug 19, 2020

This adds PHPUnit code coverage generation and Coveralls (coveralls.io) integration. To implement it, connect your GitHub repository to Coveralls and make the following change to your .travis.yml:

@@ -29,7 +29,7 @@ jobs:
   include:
     - { name: "Static code analysis", env: ORCA_JOB=STATIC_CODE_ANALYSIS }
     - { name: "Deprecated code scan", env: ORCA_JOB=DEPRECATED_CODE_SCAN }
-    - { name: "Isolated test w/ recommended package versions", env: ORCA_JOB=ISOLATED_RECOMMENDED }
+    - { name: "Isolated test w/ recommended package versions and code coverage", env: ORCA_JOB=ISOLATED_RECOMMENDED ORCA_COVERALLS_ENABLE=TRUE }
     - { name: "Integrated test w/ recommended package versions", env: ORCA_JOB=INTEGRATED_RECOMMENDED }
     - { name: "Integrated test w/ recommended package versions & previous minor release of Drupal core", env: ORCA_JOB=CORE_PREVIOUS }
     - { name: "Isolated test w/ dev package versions", env: ORCA_JOB=ISOLATED_DEV }

Fixes #95, closes #96. (Thanks, @swichers!)

@japerry
Copy link
Contributor Author

japerry commented Aug 19, 2020

@TravisCarden this appears to have tested correctly, however coveralls isn't detecting the PR. I've replicated everything from PR51, is there something else that has to happen on the coveralls side to get it to show up?
https://coveralls.io/github/acquia/orca

@TravisCarden TravisCarden added the enhancement New feature or request label Sep 3, 2020
@TravisCarden TravisCarden changed the title ORCA-142: Reimplement coveralls support from PR#51. Add support for test coverage tracking with Coveralls Sep 3, 2020
@TravisCarden TravisCarden merged commit 02489b4 into acquia:develop Sep 3, 2020
@swichers
Copy link

swichers commented Sep 3, 2020

@TravisCarden Bit late now, but I'm not a big fan of a specific service like Coveralls being forced if you also want coverage data collected. There are a lot of services out there that pull in clover files. I don't see a way to collect coverage data and not use php-coveralls without having to replace ORCA scripts.

Would really love if ORCA checked if php-coveralls was present before trying to run it. The coveralls requirement could also be moved to suggest in the composer.json. This would let people be able to use whatever code coverage solution they want without having to completely replace ORCA scripts. They could leave ORCA defaults as-is and just add additional scripts with their specific needs.

@TravisCarden
Copy link
Contributor

That's helpful feedback, @swichers, thank you. Let's continue the conversation on #106.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow collecting code coverage information.
3 participants