2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-08 14:21:05 +00:00

Update contributing guide (#730)

This commit is contained in:
Lev 2022-03-24 10:42:00 +03:00 committed by GitHub
parent 41ba718b21
commit 57d273c512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,6 @@
# Contribution Guidelines # Contribution Guidelines
Before publishing a PR, please test builds locally: Before publishing a PR, please test builds locally.
- with docker-compose for production,
- with and without nginx proxy,
- with VSCode for testing environments (only for frappe/bench image).
On each PR that contains changes relevant to Docker builds, images are being built and tested in our CI (GitHub Actions). On each PR that contains changes relevant to Docker builds, images are being built and tested in our CI (GitHub Actions).
@ -39,43 +35,37 @@ pre-commit run --all-files
## Build ## Build
We use [Docker Buildx Bake](https://docs.docker.com/engine/reference/commandline/buildx_bake/). To build the images, run command below:
```shell ```shell
# *...* targets from docker-bake.hcl, FRAPPE_VERSION=... ERPNEXT_VERSION=... docker buildx bake <targets>
# e.g. bench-build, frappe-socketio-develop or erpnext-nginx-stable.
# Stable builds require GIT_BRANCH (e.g. v13.15.0), IMAGE_TAG (version-13), VERSION (13)
# environment variables set.
docker buildx bake -f docker-bake.hcl *...*
``` ```
Available targets can be found in `docker-bake.hcl`.
## Test ## Test
### Ping site We use [pytest](https://pytest.org) for our integration tests.
Lightweight test that just checks if site will be available after creation. Install Python test requirements:
Frappe:
```shell ```shell
./tests/test-frappe.sh python3 -m venv venv
source venv/bin/activate
pip install -r requirements-test.txt
``` ```
ERPNext: Run pytest:
```shell ```shell
./tests/test-erpnext.sh pytest
``` ```
### Integration test > We also have `requirements-dev.txt` file that contains development requirements for backend image (you can find it in `images/worker/` directory).
Tests frappe-bench-like commands, for example, `backup` and `restore`.
```shell
./tests/integration-test.sh
```
# Documentation # Documentation
Place relevant markdown file(s) in the `docs` directory and index them in README.md located at the root of repo. Place relevant markdown files in the `docs` directory and index them in README.md located at the root of repo.
# Wiki # Wiki