-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
73 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
php: circleci/[email protected] | ||
workflows: | ||
build_and_test: | ||
jobs: | ||
- build_and_test | ||
jobs: | ||
build_and_test: | ||
docker: | ||
- image: circleci/php:7.4.9-cli-buster | ||
steps: | ||
- checkout | ||
- run: | | ||
sudo apt update -y && | ||
sudo apt install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev libgmp-dev re2c libmhash-dev libmcrypt-dev file zlib1g-dev && | ||
sudo ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ | ||
- run: mkdir ./php-ext-cache/ | ||
- restore_cache: | ||
keys: | ||
- extensions-v1-{{ checksum ".circleci/scripts/install-php-extensions.sh" }} | ||
- extensions-v1- | ||
- run: | ||
name: Copying restored extensions cache into extensions directory | ||
command: sudo cp -R ./php-ext-cache/. /usr/local/lib/php/extensions/no-debug-non-zts-20190902/ | ||
- run: | ||
name: Install Extensions (if not cached) | ||
command: | | ||
ls -al /usr/local/include/php/ | ||
if [ true || ! -f /usr/local/lib/php/extensions/no-debug-non-zts-20190902/mcrypt.so ]; then | ||
.circleci/scripts/install-php-extensions.sh; | ||
fi | ||
ls -al /usr/local/include/php/ | ||
- run: | ||
name: Copying extensions to temp directory for cache | ||
command: sudo cp -R /usr/local/lib/php/extensions/no-debug-non-zts-20190902/* ./php-ext-cache/ | ||
- save_cache: | ||
key: extensions-v1-{{ checksum ".circleci/scripts/install-php-extensions.sh" }} | ||
paths: | ||
- ./php-ext-cache/ | ||
|
||
- php/install-composer: | ||
install-version: 2.1.0 | ||
- php/install-packages | ||
|
||
- run: | ||
name: View PHP environment | ||
command: | | ||
php -v && | ||
composer --version && | ||
./vendor/bin/phpunit --version | ||
- run: | ||
name: Phpunit tests | ||
command: | | ||
./vendor/bin/phpunit --log-junit test-results/phpunit/junit.xml | ||
- store_test_results: | ||
path: test-results |
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,6 @@ | ||
#!/bin/sh | ||
sudo pecl install mcrypt-1.0.4 && \ | ||
sudo docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ && \ | ||
sudo docker-php-ext-configure gmp && \ | ||
sudo docker-php-ext-install -j$(nproc) gmp gd && \ | ||
sudo docker-php-ext-enable mcrypt |
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit bootstrap="vendor/autoload.php"> | ||
<testsuites> | ||
<testsuite name="TestZilliqaLaravel"> | ||
<directory>tests/Unit</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |