-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker support for local development
- Loading branch information
Showing
5 changed files
with
87 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,28 @@ | ||
# Contributing | ||
|
||
Contributions are **welcome** and will be fully **credited**. | ||
|
||
We accept contributions via Pull Requests on [Github](https://github.com/ICanBoogie/Inflector). | ||
|
||
## Pull Requests | ||
|
||
- **Add tests!** — Your contribution won't be accepted if it doesn't have tests. | ||
- **Document any change in behaviour** — Make sure the `README.md` and any other relevant documentation are kept | ||
up-to-date. | ||
- **Consider our release cycle** — We follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not | ||
an option. | ||
- **Create feature branches** — We won't pull from your main branch. | ||
- **One pull request per feature** — If you want to do more than one thing, send multiple pull requests. | ||
- **Send coherent history** — Make sure each individual commit in your pull request is meaningful. If you had to make | ||
multiple intermediate commits while developing, please [squash them][git-squash] before submitting. | ||
|
||
## Running Tests | ||
|
||
We provide a Docker container for local development. Run `make test-container` to create a new session. Inside the | ||
container run `make test` to run the test suite. Alternatively, run `make test-coverage` for a breakdown of the code | ||
coverage. The coverage report is available in `build/coverage/index.html`. | ||
|
||
**Thanks for your contribution**! | ||
|
||
|
||
[git-squash]: http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages |
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,18 @@ | ||
ARG PHP_VERSION | ||
FROM php:${PHP_VERSION}-cli-alpine | ||
|
||
RUN apk add --no-cache make && \ | ||
docker-php-ext-enable opcache && \ | ||
docker-php-source delete | ||
|
||
RUN echo $'\ | ||
display_errors=On\n\ | ||
error_reporting=E_ALL\n\ | ||
date.timezone=UTC\n\ | ||
' >> /usr/local/etc/php/conf.d/php.ini | ||
|
||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
|
||
RUN curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet && \ | ||
mv composer.phar /usr/local/bin/composer && \ | ||
echo $'export PATH="$HOME/.composer/vendor/bin:$PATH"\n' >> /root/.profile |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
version: "3.0" | ||
services: | ||
app56: | ||
build: | ||
context: . | ||
args: | ||
PHP_VERSION: 5.6 | ||
environment: | ||
PHP_IDE_CONFIG: "serverName=icanboogie-datetime" | ||
volumes: | ||
- .:/app:delegated | ||
- ~/.composer:/root/.composer:delegated | ||
working_dir: /app | ||
app74: | ||
build: | ||
context: . | ||
args: | ||
PHP_VERSION: 7.4 | ||
environment: | ||
PHP_IDE_CONFIG: "serverName=icanboogie-datetime" | ||
volumes: | ||
- .:/app:delegated | ||
- ~/.composer:/root/.composer:delegated | ||
working_dir: /app |