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

detect the suite from a test path relative to the current working dir #6051

Merged
merged 4 commits into from Jan 23, 2021

Conversation

ctrl-f5
Copy link
Contributor

@ctrl-f5 ctrl-f5 commented Dec 15, 2020

Detect the suite from a test file or path relative to the current working directory.

This fixes the issue that the suite cant be detected when codeception.yml is in any subdirectory, and subsequently also fixes the issue when it's inside the tests directory, for which there was a single use case fix in place.

@ctrl-f5 ctrl-f5 force-pushed the match-single-test-path branch 3 times, most recently from b88d3a9 to 1040c00 Compare Dec 15, 2020
@samdark
Copy link
Collaborator

samdark commented Dec 16, 2020

@Naktibalda worth merging master into this one and checking test results with GitHub actions.

@ctrl-f5 ctrl-f5 force-pushed the match-single-test-path branch from 1040c00 to a5dc57d Compare Dec 18, 2020
@ctrl-f5
Copy link
Contributor Author

ctrl-f5 commented Dec 18, 2020

@samdark updated with upstream, seems to run fine in the new actions setup!

@samdark
Copy link
Collaborator

samdark commented Dec 18, 2020

It doesn't break current tests. That's good. It would be great to add some tests verifying the change.

@ctrl-f5
Copy link
Contributor Author

ctrl-f5 commented Dec 21, 2020

It was basically already tested by CodeceptionYmlInTestsDirCest since that's one use case. I've also added a more convoluted test case with some more directories to traverse, based on how we use it in our projects.

@ctrl-f5 ctrl-f5 force-pushed the match-single-test-path branch from f01b3d7 to e480660 Compare Dec 21, 2020
src/Codeception/Command/Run.php Outdated Show resolved Hide resolved
@Naktibalda Naktibalda merged commit 3579d06 into Codeception:4.1 Jan 23, 2021
13 checks passed
@Naktibalda
Copy link
Member

Naktibalda commented Jan 29, 2021

@ctrl-f5 Your change broke codecept run tests - it is fails with this error:

In Run.php line 545:

  Test file can't be matched

#6103

Could you fix it?

@Naktibalda
Copy link
Member

Naktibalda commented Jan 29, 2021

I implemented patch, which will make your change to apply only if relative path is inside tests directory #6105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants