Force PHPUnit Environment to "testing" Since Github Test Workflow is Inheriting "Local"#729
Force PHPUnit Environment to "testing" Since Github Test Workflow is Inheriting "Local"#729allella wants to merge 1 commit into
Conversation
… allow overwriting to local
|
@bogdankharchenko here's the original concern. I've copied the comment below since the link jumping seems to be doing goofy things.
Our .env.ci does declare the 'local' environment and the workflow file is running
If I recall, the test_robots_txt_disallows_all_in_non_production_test was failing on Github saying that 'local' didn't match 'testing'. Before we do anything else, it's probably worth verifying if that's the case by emitting the environment variable as part of the testing workflow to find out if Github is running tests in 'local' (via to the .env.ci copying) or 'testing' (via phpunit.xml).
Note that I changed test_robots_txt_disallows_all_in_non_production_test in #726 so it checks for 'not production' instead of specifically for 'testing'. That change allowed for running Here's test_robots_txt_disallows_all_in_non_production_test as it is now. This test would pass regardless of if Github is running in 'testing' or 'local', but that's by design as we expect to see Disallow in any env that's not production.
|
|
I'm not sure about this change, to me needing to add something that says |
|
@oliviasculley @bogdankharchenko the main question is if we are intentionally importing .env.ci into the workflow. It declares local, which seems odd to me. I would have assumed 'testing' If that's the fix, then I agree that we don't need this PR, but rather a PR to change .env.ci to testing. |
|
I just read a little more and I think we should definitely be modifying the |
|
I'm pulling @irby back in as the .env.ci was created by Matt with 'local' in the original file. I feel like he thought the phpunit.xml change was okay, but it could have been that I should have suggested a better solution, like could we "fix" the .env.ci, or should we change the Github workflows to use the .env.testing. The .env.ci and .env.testing both use I'm not a testing guru, so I'm not even sure if/why we need both and if we could simply change .env.ci or .env.testing to If that's the easy fix, then we'd also want to compare .env.testing and .env.ci because the former is probably out of date. Side note, since I looked it up. There is a lot of overriding that can happen (summary below), so I agree the PHPUnit thing feels sort of ick if we can fix it at another level.
|



Per conversation in #726 we had support for forcing PHPUnit to use testing.
The Github action that runs our tests is copying .env.ci and that's set to 'local', which appears to preempt the phpunit.xml value.