Skip to content

Commit

Permalink
Added information about docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
cableman committed Oct 8, 2024
1 parent 8447a44 commit 31ddb1b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ services:
- PHP_IDE_CONFIG=serverName=localhost
volumes:
- .:/app

node:
image: node:20
networks:
- app
extra_hosts:
- "host.docker.internal:host-gateway"
working_dir: /app
volumes:
- .:/app
29 changes: 16 additions & 13 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,45 @@

This document describes various tools used during development of this library.

## Install

To install the dependencies required for the development and usage of this
library, run `composer install` through the supplied Docker Compose.

```shell
dokcer compose run --rm phpfpm composer install
```

## Tests

We use the [PHPUnit](https://phpunit.de/) testing framework.

To run tests execute the following command:

```shell
vendor/bin/phpunit --coverage-clover=coverage/unit.xml
dokcer compose run --rm phpfpm vendor/bin/phpunit --coverage-clover=coverage/unit.xml
```

## Check coding standards

The following commands let you test that the code follows the coding
standards we decided to adhere to in this project.

### PHP

```shell
composer install
composer coding-standards-check
dokcer compose run --rm phpfpm composer coding-standards-check
```

### Markdown
### Check Markdown file

```shell
yarn install
yarn run coding-standards-check
dokcer compose run --rm node yarn install
dokcer compose run --rm node yarn run coding-standards-check
```

## Apply coding standards

You can automatically fix some coding styles issues by running

### PHP
You can automatically fix some coding styles issues by running:

```shell
composer install
composer coding-standards-apply
dokcer compose run --rm phpfpm composer coding-standards-apply
```

0 comments on commit 31ddb1b

Please sign in to comment.