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

Make unit tests build faster by basing the image off base-php instead of the full app image #1280

Merged
merged 2 commits into from
Jan 14, 2022

Conversation

megahirt
Copy link
Collaborator

@megahirt megahirt commented Jan 13, 2022

Description

Re-architect the test-php image to be built off the base-php image for faster building and execution of unit tests. This should get unit tests running in under 2 minutes without all the UI building happening in the full app image (not necessary for PHP unit tests)

Also, use a docker layer cache action.

Informal testing:

  • before this PR: unit tests complete in 4 minutes
  • this PR, without layer caching: unit tests complete in 2 minutes
  • this PR, layer caching first run (create cache): 2.5 minutes
  • this PR, with existing cache: 1.5 minutes 🥇

Testing on your branch

  • Unit tests run correctly on my local machine
  • Unit tests run correctly on CI

Checklist

  • I have performed a self-review of my own code
  • I have reviewed the title/description of this PR which will be used as the squashed PR commit message
  • I have commented my code, particularly in hard-to-understand areas

qa.languageforge.org testing

Reviewers: add/replace your name below and check the box to sign-off/attest the feature works as expected on qa.languageforge.org

  • Reviewer1 (YYYY-MM-DD HH:MM)
  • Reviewer2 (YYYY-MM-DD HH:MM)

Re-architect the test-php image to be built off the base-php image for faster building and execution of unit tests.  This should get unit tests running in under 1 minute without all the UI building happening in the full app image (not necessary for PHP unit tests)
This is experimental to see if we can get the time down below 2 minutes
Copy link
Contributor

@longrunningprocess longrunningprocess left a comment

Choose a reason for hiding this comment

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

let's pair on the this, I see some stuff that needs to be pulled out.

@megahirt megahirt merged commit 7798b18 into develop Jan 14, 2022
@megahirt megahirt deleted the feature/fastUnitTests branch January 14, 2022 01:30
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.

2 participants