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

[IMP] Install testing requirements into separate image. #409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amh-mw
Copy link

@amh-mw amh-mw commented Apr 7, 2022

Fixes #277

@amh-mw amh-mw marked this pull request as draft April 7, 2022 19:01
@amh-mw
Copy link
Author

amh-mw commented Apr 7, 2022

I'm still playing around with this a bit, so I've included two versions of the work.

In version one, the main Dockerfile is converted into a multi-stage build, which would require existing build processes to add --target=web.

In version two, an entirely separate test.Dockerfile is created. This is more similar to what my own build process currently looks like.

@amh-mw
Copy link
Author

amh-mw commented Apr 7, 2022

Some workflows to consider:

When I'm developing locally, I don't want to repeatedly reinstall chromium, so my image inheritance looks like:
odoo:15 -> odoo:test -> me:latest

When I'm pushing code, I don't want chromium in production, but I want to test an image that is very similar:
odoo:15 -> me:latest -> me:test
Run tests on me:test, but push me:latest into the image repository.

@amh-mw amh-mw marked this pull request as ready for review April 18, 2022 18:32
@amh-mw
Copy link
Author

amh-mw commented Apr 18, 2022

This is working nicely for me with a .travis.yml containing:

script:
  - docker build . --tag=me:travis || travis_terminate 1
  - docker build . -f test.Dockerfile --build-arg=image=me:travis --tag=me:test || travis_terminate 1
  - docker-compose -f docker-compose.travis.yaml run test || travis_terminate 1

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.

Chromium and websocket-client packages missing for js testing
1 participant