-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
667 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,11 @@ jobs: | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Cache Docker images | ||
uses: ScribeMD/[email protected] | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles('Dockerfile-dev','tests/TargetPhpVmProvider.php') }} | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
|
@@ -49,7 +54,10 @@ jobs: | |
- name: Run test suite | ||
run: | | ||
mkdir -p build/logs | ||
./vendor/bin/phpunit --coverage-clover build/logs/clover.xml | ||
composer test-for-ci | ||
- name: Fix absolute paths in the coverage report | ||
run: sed -i "s|<file name=\"/app/|<file name=\"`pwd`/|g" build/logs/clover.xml | ||
|
||
- name: Send to coveralls | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM php:8.1-cli | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
libffi-dev \ | ||
libzip-dev \ | ||
&& docker-php-ext-install ffi \ | ||
&& docker-php-ext-install pcntl \ | ||
&& docker-php-ext-install zip \ | ||
&& pecl install pcov \ | ||
&& docker-php-ext-enable pcov \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y ca-certificates curl gnupg \ | ||
&& install -m 0755 -d /etc/apt/keyrings \ | ||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \ | ||
&& chmod a+r /etc/apt/keyrings/docker.gpg \ | ||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" \ | ||
| tee /etc/apt/sources.list.d/docker.list > /dev/null \ | ||
&& apt-get update -y \ | ||
&& apt-get install -y docker-ce-cli \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
||
RUN composer install | ||
|
||
CMD ["php", "vendor/bin/phpunit", "--colors=always", "--testdox", "--coverage-text", "--coverage-clover=coverage.xml", "--coverage-html=coverage"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
version: '3.9' | ||
services: | ||
reli-test: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-dev | ||
pid: "host" | ||
cap_add: | ||
- SYS_PTRACE | ||
security_opt: | ||
- seccomp:unconfined | ||
volumes: | ||
- .:/app | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /tmp/reli-test:/tmp/reli-test | ||
container_name: reli-test | ||
command: ["vendor/bin/phpunit" , "--colors=always", "--testdox"] | ||
reli-test-with-coverage: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-dev | ||
pid: "host" | ||
cap_add: | ||
- SYS_PTRACE | ||
security_opt: | ||
- seccomp:unconfined | ||
volumes: | ||
- .:/app | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /tmp/reli-test:/tmp/reli-test | ||
- ./build:/app/build | ||
container_name: reli-test | ||
command: ["vendor/bin/phpunit" , "--colors=always", "--testdox", "--coverage-clover", "build/logs/clover.xml"] | ||
reli-test-for-ci: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-dev | ||
pid: "host" | ||
cap_add: | ||
- SYS_PTRACE | ||
security_opt: | ||
- seccomp:unconfined | ||
volumes: | ||
- .:/app | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /tmp/reli-test:/tmp/reli-test | ||
- ./build:/app/build | ||
container_name: reli-test | ||
command: ["vendor/bin/phpunit" , "--coverage-clover", "build/logs/clover.xml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.