https://github.com/mcb30/odoo-tester
Odoo automated test container
https://github.com/mcb30/odoo-tester
docker odoo testing
Last synced: about 2 months ago
JSON representation
Odoo automated test container
- Host: GitHub
- URL: https://github.com/mcb30/odoo-tester
- Owner: mcb30
- Created: 2018-06-12T18:12:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-02T22:32:10.000Z (over 5 years ago)
- Last Synced: 2025-03-21T10:21:20.420Z (over 1 year ago)
- Topics: docker, odoo, testing
- Language: Dockerfile
- Size: 11.7 KB
- Stars: 2
- Watchers: 6
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Odoo automated unit test runner
[](https://github.com/mcb30/odoo-tester/actions?query=workflow%3ABuild+branch%3Amaster)
[](https://hub.docker.com/r/mcb30/odoo-tester/)
This is a recipe for building a [Docker](https://www.docker.com/)
container suitable for running automated unit tests on
[Odoo](https://github.com/odoo/odoo) modules. The container is built
using [Fedora](https://getfedora.org/) and the latest Odoo branch.
Almost all dependencies are provided using official Fedora packages.
The resulting container is published on Docker Hub as
[`mcb30/odoo-tester`](https://hub.docker.com/r/mcb30/odoo-tester/).
## Building
To build and publish the container image:
docker build -t mcb30/odoo-tester .
docker push mcb30/odoo-tester
## Running
To run Odoo within the container:
docker run -it --rm mcb30/odoo-tester
Any extra arguments will be appended to the `odoo-bin` command line.
For example, to install the `product` module:
docker run -it --rm mcb30/odoo-tester -i product
## Extending
The primary use case for this container image is to allow for the
automated testing of external Odoo modules. An external module may
include a `Dockerfile` such as:
FROM mcb30/odoo-tester
ADD addons/my_module /opt/odoo-addons/my_module
CMD ["--test-enable", "-i", "my_module"]
Tests can then be run (from within the external module's directory)
using:
docker build -t my_module-tester .
docker run -it --rm my_module-tester
These commands can be invoked as part of a continuous integration
system such as [GitHub Actions](https://docs.github.com/actions), to
ensure that the module's automated tests are run automatically for
every commit and pull request.