Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

Add Theme Support#150

Merged
valendesigns merged 6 commits intomasterfrom
feature/themes
Aug 16, 2017
Merged

Add Theme Support#150
valendesigns merged 6 commits intomasterfrom
feature/themes

Conversation

@valendesigns
Copy link
Copy Markdown
Contributor

This PR adds support for themes to be unit tested. Additionally, it provides a way to clone plugin dependencies for the theme by adding a THEME_DEPS variable to the travis.yml or .dev-lib files that consists of a list of URLs separated by commas.

INSTALL_PATH="$WP_CORE_DIR/src/wp-content/themes/$PROJECT_SLUG"

# Rsync the files into the right location
mkdir -p "$INSTALL_PATH"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder, why was --exclude .git/hooks included here and originally for the plugin project type. I would think that excluding all of .git should be what is done instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I didn't dive deep into that because I didn't really understand the code. I just did a copy and paste.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why don't you go ahead and change .git/hooks to .git. I think that is what should be done for both here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess by removing the hooks it was preventing the pre-commit hook from executing?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But are any git commands even executed when the files are synced to the INSTALL_PATH?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll update both of them. 👍

@kasparsd
Copy link
Copy Markdown
Contributor

@valendesigns I was wondering if you would mind me pushing the suggested changes from the code review? It would be very cool to finally have phpunit support for themes.

@valendesigns
Copy link
Copy Markdown
Contributor Author

@westonruter & @kasparsd This is ready to be reviewed. Seems the coverage clover was not generating since this commit 39753b9 was introduced back in March so I had to fix that. I've tested that the changes work with my Archetype theme, here's a passing build with coverage https://travis-ci.org/valendesigns/archetype/jobs/264974727

However, I think there's might be something wrong with the Coveralls connection since the coverage clover was generated but never made it to Coveralls https://coveralls.io/github/valendesigns/archetype

It seems all of our plugins have not been working with Coveralls for a while and nobody noticed. 😞

Copy link
Copy Markdown
Contributor

@kasparsd kasparsd left a comment

Choose a reason for hiding this comment

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

Works great! Tested with a private theme.

@valendesigns valendesigns merged commit 5be5ba0 into master Aug 16, 2017
@kasparsd kasparsd deleted the feature/themes branch August 17, 2017 05:52
@tfirdaus
Copy link
Copy Markdown
Contributor

tfirdaus commented Aug 19, 2017

@valendesigns I did notice something wrong with the Coveralls a few months ago hence switching back to older commits. However, the latest commit still does not seem to work either.

Coverage clover is generated https://travis-ci.org/ninecodes/wp-social-manager/jobs/266328984 yet nothing is pushed to Coveralls for the latest build https://coveralls.io/github/ninecodes/wp-social-manager.

What do I do wrong here?


I've figured out that the issue is because of the entire .git directory is excluded (https://github.com/xwp/wp-dev-lib/blob/master/check-diff.sh#L706) that php-coveralls will throw an error when checking the plugin git branch.

Reverting the exclusion to just the .git/hooks seems to fix the issue as demonstrated in this build https://travis-ci.org/ninecodes/wp-social-manager/jobs/266328985.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants