Open jasonbahl opened 2 years ago
One idea could be to use some environment variables to specify what fork of WPGraphQL / WPGraphQL Smart Cache and what branch to use.
For example, if I open a PR to WPGraphQL and we want to test against it, we could use an env var like:
WP_GRAPHQL_REPO="https://github.com/jasonbahl/wp-graphql"
< my fork
WP_GRAPHQL_BRANCH="feature/add-some-filter-for-caching"
< my pr branch
defaults of these variables could be something like:
WP_GRAPHQL_REPO="https://github.com/wp-graphql/wp-graphql"
WP_GRAPHQL_BRANCH="master"
but we could override them to test against different forks as needed 🤔
Things to figure out
We might also need to consider a matrix as well so we know what versions of what plugins cause conflicts with each other? 🤔
Like is xx plugin incompatible with xx version of WPGraphQL?
Currently we're running E2E tests manually, because we test against a live WP Engine site.
It would be nice to have a Github workflow that uploads the zip of the plugin to a live WPE site, then runs the tests.
Questions:
Since the tests need to happen in a live environment, how to we ensure we don't have multiple tests running at the same time, trying to upload different versions of the same plugin(s)?
If we have a PR to WPGraphQL or WPGraphQL Smart Cache that we need to test against, how do we ensure we're uploading that version of WPGraphQL / WPGraphQL Smart Cache to test against?
What should trigger the tests? Opening a PR to this repo? Does it need a specific label or tag or branch naming convention (i.e.
release/x.x.x
)