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

Move validation test suite, phpstan to GitHub Workflows #386

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TysonAndre
Copy link
Contributor

@TysonAndre TysonAndre commented Sep 25, 2022

  • Perform a shallow clone of submodules analyzed in validation
    test suite in GitHub workflows (should take around 30 seconds)
  • Switch badge in README.md to GitHub Workflows and update default
    branch for badge.
  • Remove travis config
  • After PHPStan Level 3 #385 is merged run_phpstan.sh can remove the separate install
    step (as a followup PR)
  • Require a newer phpunit patch version in devDependencies
    Make it harder for contributors to have any inconsistencies with CI
    when running tests (e.g. php version support, fixed phpunit bugs, etc)

@TysonAndre TysonAndre force-pushed the update-docker-image branch from 6060b96 to b07595b Compare October 8, 2022 15:34
@TysonAndre TysonAndre changed the title Move validation test suite to GitHub Workflows Move validation test suite, phpstan to GitHub Workflows Oct 8, 2022
@TysonAndre TysonAndre force-pushed the update-docker-image branch from 70cd20b to 89f263b Compare October 8, 2022 15:46
@TysonAndre
Copy link
Contributor Author

This is ready for review, no other changes are planned

  • phpstan successfully ran in php 7.2 (needed to use matrix.VALIDATION)
  • The validation folder is now mounted as a read-only volume when running tests with ci/run_tests_dockerized.sh and the test suite runs on the 10000+ php files found in validation/frameworks
  • This was rebased against the latest commits

roblourens
roblourens previously approved these changes Nov 21, 2022
Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you for doing this!

rzhao271
rzhao271 previously approved these changes Nov 21, 2022
@roblourens roblourens dismissed stale reviews from rzhao271 and themself via 22f3d87 November 21, 2022 22:26
# -u Fail for undefined variables
set -xeu
# This installs and runs phpstan
# TODO: Remove separate phpstan install step after https://github.com/microsoft/tolerant-php-parser/pull/385 is merged
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've merged 385 and removed a merge conflict with main, do you want to remove this now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This separate step can be removed now though right?

@TysonAndre TysonAndre force-pushed the update-docker-image branch 2 times, most recently from 85ad200 to a4dcca3 Compare January 3, 2024 15:32
- Perform a shallow clone of submodules analyzed in validation
  test suite in GitHub workflows (should take around 30 seconds)
- Switch badge in README.md to GitHub Workflows and update default
  branch for badge.
- Remove travis config
- After microsoft#385 is merged run_phpstan.sh can remove the separate install
  step (as a followup PR)
- Require a newer phpunit patch version in devDependencies
  Make it harder for contributors to have any inconsistencies with CI
  when running tests (e.g. php version support, fixed phpunit bugs, etc)
@TysonAndre TysonAndre force-pushed the update-docker-image branch from a4dcca3 to edc8352 Compare January 3, 2024 15:41
@TysonAndre
Copy link
Contributor Author

I undid the changes to php versions in github actions to avoid conflicts with https://github.com/microsoft/tolerant-php-parser/pull/406/files#diff-7829468e86c1cc5d5133195b5cb48e1ff6c75e3e9203777f6b2e379d9e4882b3 and updated composer.json again

Unit tests and validation steps aren't run until the workflow run is approved https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks

@roblourens
Copy link
Member

It looks like phpstan ran out of memory

     PHPStan process crashed because it reached configured PHP memory limit:   
     128M      

@dantleech
Copy link
Contributor

It looks like phpstan ran out of memory

if that's the only issue it can be fixed with phpstan --memory-limit=4G or similar cc @TysonAndre

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.

4 participants