-
Notifications
You must be signed in to change notification settings - Fork 514
Use bashunit for e2e tests #3160
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
Changes from all commits
75a8fca
2c588d7
1328bc9
80e5419
995d940
33fb5b6
e516557
da1d6d1
08e23b8
6731637
e6f8b03
f4f5a3c
357137b
1e78af9
06b377f
ec5d625
eb0b893
4b69f45
4cb78ea
67d6f64
1d27a21
0c740f7
e175098
fe5ccbe
7d37b27
51fe9c5
17479ba
93ef01a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,26 +194,26 @@ jobs: | |
patch -b data/TraitOne.php < TraitOne.patch | ||
OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true) | ||
echo "$OUTPUT" | ||
[ $(echo "$OUTPUT" | wc -l) -eq 1 ] | ||
grep 'Method TraitsCachingIssue\\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' <<< "$OUTPUT" | ||
../bashunit -a line_count 1 "$OUTPUT" | ||
../bashunit -a contains 'Method TraitsCachingIssue\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' "$OUTPUT" | ||
- script: | | ||
cd e2e/trait-caching | ||
../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ | ||
patch -b data/TraitTwo.php < TraitTwo.patch | ||
OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true) | ||
echo "$OUTPUT" | ||
[ $(echo "$OUTPUT" | wc -l) -eq 1 ] | ||
grep 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' <<< "$OUTPUT" | ||
../bashunit -a line_count 1 "$OUTPUT" | ||
../bashunit -a contains 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' "$OUTPUT" | ||
- script: | | ||
cd e2e/trait-caching | ||
../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ | ||
patch -b data/TraitOne.php < TraitOne.patch | ||
patch -b data/TraitTwo.php < TraitTwo.patch | ||
OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true) | ||
echo "$OUTPUT" | ||
[ $(echo "$OUTPUT" | wc -l) -eq 2 ] | ||
grep 'Method TraitsCachingIssue\\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' <<< "$OUTPUT" | ||
grep 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' <<< "$OUTPUT" | ||
../bashunit -a line_count 2 "$OUTPUT" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to reproduce it locally, so I cloned your fork ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See the README.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I can reproduce on the CLI outside of phpstan repo with:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, in such a case the bug seems to be in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm .. the unit test regarding it looked good: I don't know bash good enough, but I had a feeling the problem is related to the assertion via args passing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can reproduce it, yes. This is a bashunit issue, I will work on it today 🏗️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, TypedDevs/bashunit#265 is merged and we are getting closer to the light! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the latest error, I think we might have found a major problem wrt multiline strings mmmm I have an idea, but it might take a while... let me see if I can create a draft for this today 🏗️
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same drill: TypedDevs/bashunit#266 is merged, can you try the latest beta again, @staabm? 🤞🏼 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Chemaclass all e2e are green now. thank you very much for your efforts <3. |
||
../bashunit -a contains 'Method TraitsCachingIssue\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' "$OUTPUT" | ||
../bashunit -a contains 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' "$OUTPUT" | ||
|
||
steps: | ||
- name: "Checkout" | ||
|
@@ -233,6 +233,9 @@ jobs: | |
- name: "Patch PHPStan" | ||
run: "patch src/Analyser/Error.php < e2e/PHPStanErrorPatch.patch" | ||
|
||
- name: "Install bashunit" | ||
run: "curl -s https://bashunit.typeddevs.com/install.sh | bash -s e2e/ beta" | ||
|
||
- name: "Test" | ||
run: "${{ matrix.script }}" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
/tests/.phpunit.result.cache | ||
/tests/PHPStan/Reflection/data/golden/ | ||
tmp/.memory_limit | ||
e2e/bashunit |
Uh oh!
There was an error while loading. Please reload this page.