Skip to content

Commit

Permalink
Merge pull request #26 from wandersonwhcr/feature/composer
Browse files Browse the repository at this point in the history
Disable PHP Actions
  • Loading branch information
wandersonwhcr committed Apr 1, 2021
2 parents 17845af + e5f4c58 commit e1170d5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
echo UID=`id -u` >> $GITHUB_ENV
echo GID=`id -g` >> $GITHUB_ENV
- name: Build
run: docker-compose build
env:
PHP_VERSION: ${{ matrix.php_version }}
- name: Install
uses: php-actions/composer@v5
with:
php_version: ${{ matrix.php_version }}
run: docker-compose run romans composer install
- name: Test
uses: php-actions/composer@v5
with:
php_version: ${{ matrix.php_version }}
command: test
run: docker-compose run romans composer test
- name: Clean
run: docker-compose down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ You can use Docker Compose to build an image and run a container to develop and
test this package.

```bash
docker-compose up --detach

docker-compose exec romans composer install

docker-compose exec romans composer test
docker-compose build
docker-compose run romans composer install
docker-compose run romans composer test
```

## License
Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ version: "3.8"
services:

romans:
build: "./docker-compose"
build:
context: "./docker-compose"
args:
PHP_VERSION: "${PHP_VERSION:-8.0}"
volumes:
- ".:/app"
user: "${UID:-1000}:${GID:-1000}"
Expand Down
4 changes: 3 additions & 1 deletion docker-compose/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM php:7.4-cli-alpine
ARG PHP_VERSION

FROM php:${PHP_VERSION}-cli-alpine

ENV COMPOSER_CACHE_DIR /tmp

Expand Down

0 comments on commit e1170d5

Please sign in to comment.