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

Allow docker test rake task to be used for single plugins #4973

Merged
merged 6 commits into from Jul 21, 2017

Conversation

4 participants
@davidtaylorhq
Contributor

davidtaylorhq commented Jul 12, 2017

This is useful for adding continuous integration to individual plugin repositories. For example, I've just set up discourse-chat-integration to run its tests on travis automatically. (Currently it applies this patch manually).

This change adds support for a SINGLE_PLUGIN environment variable. If set, it only runs rspec tests for that specific plugin. If left unset, everything continues to function as it currently does.

(Specific qunit tests can already be run using the MODULE or FILTER environment variables)

example travis file making use of this feature

working test

Allow docker test rake task to be used for single plugins
This is useful for adding continuous integration to individual plugin repositories
@discoursebot

This comment has been minimized.

discoursebot commented Jul 12, 2017

You've signed the CLA, davidtaylorhq. Thank you! This pull request is ready for review.

@SamSaffron

This comment has been minimized.

Member

SamSaffron commented Jul 13, 2017

This is fine, but let's add some documentation for this somewhere first.

@davidtaylorhq

This comment has been minimized.

Contributor

davidtaylorhq commented Jul 13, 2017

Where would you like the documentation? As a comment at the top of the file? I think a list of all the possible environment variables is probably a bit long to fit in the description line

desc 'Run all tests (JS and code in a standalone environment)'

 

@davidtaylorhq

This comment has been minimized.

Contributor

davidtaylorhq commented Jul 13, 2017

@SamSaffron I've added some documentation as comments, but maybe there's a better place for them to go?

Once this is merged I'll also update my meta topic on plugin CI testing with the details.

@davidtaylorhq

This comment has been minimized.

Contributor

davidtaylorhq commented Jul 20, 2017

@SamSaffron I've updated this so it works with your new SKIP_CORE env variable, and also added the new ENV variables to the documentation at the top

# running it anywhere else will likely fail
#
# Environment Variables (specific to this rake task)
# => SKIP CORE set to 1 to skip core rspec tests

This comment has been minimized.

@tgxworld

tgxworld Jul 21, 2017

Member

Missing underscore here?

@tgxworld tgxworld merged commit 62604e9 into discourse:master Jul 21, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@tgxworld

This comment has been minimized.

Member

tgxworld commented Jul 21, 2017

Thank you for all your work so far 👍 @davidtaylorhq

@SamSaffron

This comment has been minimized.

Member

SamSaffron commented Jul 21, 2017

@davidtaylorhq awesome! a big one missing is the ability to run all qunit tests for ALL plugins (without core) can you swing adding that?

@davidtaylorhq

This comment has been minimized.

Contributor

davidtaylorhq commented Jul 21, 2017

I'm not sure how to detect which qunit tests are for plugins or for core - as far as I can see qunit offers filtering by "Module" or keyword... nothing for test file path.

Any ideas?

@SamSaffron

This comment has been minimized.

Member

SamSaffron commented Jul 21, 2017

yeah ... that has been my conundrum here as well :)

I have no idea how to swing this but totally need it, maybe core can be hacked somehow to allow this?

@davidtaylorhq

This comment has been minimized.

Contributor

davidtaylorhq commented Jul 21, 2017

Ok cool, I'll have a look in more detail next week.

@davidtaylorhq

This comment has been minimized.

Contributor

davidtaylorhq commented Jul 22, 2017

For reference: second PR is here #4985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment