-
-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a
docker-compose
setup to allow project contributors to quickly…
… run the test suite on their local machines. (#762) * Added a docker-compose setup to allow others to quickly run the test suite on their local machines without needing to install the test stack onto the environment. * Added the PHPStan static analysis to the steps.
- Loading branch information
1 parent
6291e99
commit 9fca1f0
Showing
3 changed files
with
54 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,29 @@ | ||
# docker-compose up -d && docker logs -f scribe_app_1 | ||
FROM ubuntu:jammy | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
|
||
# APT | ||
RUN apt-get -qq update && apt-get install -qq \ | ||
make \ | ||
curl \ | ||
php \ | ||
php-curl \ | ||
php-xml \ | ||
php-sqlite3 \ | ||
php-bcmath \ | ||
php-curl \ | ||
php-gd \ | ||
php-imagick \ | ||
php-intl \ | ||
php-mbstring \ | ||
php-pdo \ | ||
php-zip \ | ||
php-soap \ | ||
php-pcov \ | ||
git \ | ||
p7zip-full | ||
|
||
# Composer Install | ||
RUN curl -sS https://getcomposer.org/installer | php && \ | ||
mv composer.phar /usr/local/bin/composer |
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,14 @@ | ||
# Test steps, install, lint, test. | ||
test: install lint-ci test-ci | ||
|
||
# Composer install step | ||
install: | ||
composer install | ||
|
||
# Linter step | ||
lint-ci: | ||
composer lint | ||
|
||
# Test step | ||
test-ci: | ||
composer test-ci |
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,11 @@ | ||
# Allow devs to run the unit tests in a dockerized environment | ||
# clear && docker-compose up -d && docker logs -f scribe_app_1 | ||
version: '3.7' | ||
services: | ||
app: | ||
build: | ||
context: ./ | ||
volumes: | ||
- ./:/testing | ||
working_dir: /testing | ||
command: make test |