Skip to content

Commit

Permalink
Use docker compose in GitHub action. (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ademarco authored Oct 3, 2024
1 parent 9e25f40 commit 275eee9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CI

on: [push, pull_request_target]
on: [push, pull_request]

jobs:
build-test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
matrix:
ROBO_VERSION: [ "4.0", "5.0" ]
Expand All @@ -14,14 +14,13 @@ jobs:
PHP_VERSION: "8.0"
- ROBO_VERSION: "4.0"
PHP_VERSION: "8.1"

env:
PHP_VERSION: ${{ matrix.PHP_VERSION }}
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
command: "require consolidation/robo:~${{ matrix.ROBO_VERSION }}"
php_version: ${{ matrix.PHP_VERSION }}
version: 2
- uses: php-actions/phpunit@v3
with:
test_suffix: FALSE
- name: clone
uses: actions/checkout@v4
- name: test
run: |
docker compose up -d
docker compose exec -u root -T php composer require consolidation/robo:~${{ matrix.ROBO_VERSION }}
docker compose exec -u root -T php phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ composer.lock
grumphp.yml
phpunit.xml
tests/fixtures/tmp/*.php
.phpunit.result.cache
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
php:
image: wodby/php:${PHP_VERSION}
volumes:
- .:/var/www/html

0 comments on commit 275eee9

Please sign in to comment.