Skip to content

Commit 9f51674

Browse files
committed
Describe how to run tests locally
1 parent c306a84 commit 9f51674

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,25 @@ Some of the ideas for upcoming filters:
5757

5858
New pull requests should be based on the `develop` branch.
5959
The `master` branch is the stable branch: it usually matches the latest a release but in can be a bit ahead.
60+
61+
Setting up an environment with all the required libraries may be very hard.
62+
In order to run the tests locally, you can use the same [docker images](https://github.com/php-imagine/docker-builder/pkgs/container/test) used by Imagine to test the pull requests.
63+
64+
For example, if you have Imagine locally in the `/home/me/imagine` folder, you can run tests for PHP 8.1 with the GD and Imagick with this very simple approach:
65+
66+
1. Launch a temporary docker container with:
67+
```sh
68+
docker run --rm -it -v /home/me/imagine:/app ghcr.io/php-imagine/test:8.1-gd-imagick bash
69+
```
70+
2. Inside the docker container, run these commands:
71+
```sh
72+
cd /app
73+
composer update
74+
compoer run test -- --exclude-group always-skipped,gmagick
75+
```
76+
77+
PS: This approach works on Windows too: simply launch the docker container with
78+
79+
```
80+
docker run --rm -it -v C:\Path\To\Imagine:/app ghcr.io/php-imagine/test:8.1-gd-imagick bash
81+
```

0 commit comments

Comments
 (0)