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

Docker/Codeception/CI configurations overhauled #416

Merged
merged 6 commits into from
Jan 22, 2021

Conversation

kidunot89
Copy link
Member

@kidunot89 kidunot89 commented Dec 26, 2020

Your checklist for this pull request

Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.

🚨Please review the guidelines for contributing to this repository.

  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Make sure you are requesting to pull request from a topic/feature/bugfix branch (right side). Don't pull request from your master!

What does this implement/fix? Explain your changes.

  • Docker configurations now supports live-development, cli testing, xdebug step debugging.
  • johnpbloch/wordpress package now used for testing/development.
  • WooGraphQL Doc site testing quick start updated to reflect changes.
  • Github Action workflow updated to work with new configurations and working.

@jasonbahl This overhauls all testing scripts and removes a lot of bloat.

To run all the tests right away in a standalone method for CI, just run composer run-test-standalone.

To run the tests in a more controlled way on top of a live docker network. First run composer run-app and once you see this log
image
run the with the following in another terminal to run the tests.

FILTER="wpunit CartMutationsTest:testAddToCartMutationWithProduct --debug" composer docker-run-test

Note the FILTER variable's use

You can also use XDebug step debugging with the controlled method. Here's a working VSCode php-xdebug configuration.

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "pathMappings": {
              "/var/www/html/wp-content/plugins/wp-graphql-woocommerce": "${workspaceRoot}",
              "/var/www/html/tests": "${workspaceRoot}/tests"
            }
        }
    ]
}

Not sure how you would configure it in PHPStorm

Does this close any currently open issues?

Any relevant logs, error output, GraphiQL screenshots, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Any other comments?

Where has this been tested?

Operating System: Ubuntu 20.04

WordPress Version: 5.6

@kidunot89 kidunot89 added work in progress Solution development in progress dev-ops PR resolves an issue or implements a feature related to the development process labels Dec 26, 2020
@kidunot89 kidunot89 self-assigned this Dec 26, 2020
@kidunot89 kidunot89 changed the title Docker/Codeception configurations overhauled Docker/Codeception/CI configurations overhauled Dec 26, 2020
@kidunot89 kidunot89 force-pushed the devops/dev-routines branch 11 times, most recently from ae51336 to 9b26b4c Compare January 19, 2021 18:43
@jasonbahl
Copy link
Collaborator

💪

@kidunot89 kidunot89 force-pushed the devops/dev-routines branch 2 times, most recently from 2cdd917 to d56952b Compare January 22, 2021 03:45
@kidunot89 kidunot89 merged commit bc1c826 into wp-graphql:develop Jan 22, 2021
@kidunot89 kidunot89 deleted the devops/dev-routines branch January 22, 2021 16:59
@kidunot89 kidunot89 added enhancement New feature or request and removed work in progress Solution development in progress labels Feb 24, 2021
@kidunot89 kidunot89 added breaking change Solution will break some older solutions and removed breaking change Solution will break some older solutions labels Feb 24, 2021
@kidunot89 kidunot89 mentioned this pull request Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-ops PR resolves an issue or implements a feature related to the development process enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants