wpengine / wpe-graphql-cache

An integration with wp-graphql and WPE to purge graphql requests cached in Varnish.
2 stars 2 forks source link

Automate End 2 End Tests #12

Open jasonbahl opened 2 years ago

jasonbahl commented 2 years ago

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:

jasonbahl commented 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 🤔

markkelnar commented 2 years ago

Things to figure out

jasonbahl commented 2 years ago

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?