Skip to content

Commit

Permalink
adding to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jgivoni committed Feb 12, 2025
1 parent b96fce0 commit cd5d819
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,36 @@ jobs:

- name: Run unit tests
run: docker exec mycontainer vendor/bin/phpunit

job3:
strategy:
matrix:
php_version: ["8.1"]
name: PhpCsFixer code style checker ${{ matrix.php_version }}
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v3

- name: Enable caching
uses: satackey/[email protected]
# Deprecation warnings are expected...
continue-on-error: true

- name: Build image
run: docker image build . -f Dockerfile -t myimage:latest --build-arg PHP_VERSION=${{ matrix.php_version }}

- name: Launch container
run: docker run -d -v "$(pwd)/:/app" --name mycontainer myimage:latest tail -f /dev/null

- name: Check PHP version
run: docker exec mycontainer php -v

- name: Check composer.json validity
run: docker exec mycontainer composer validate

- name: Install dependencies
run: docker exec mycontainer composer install

- name: Run unit tests
run: docker exec mycontainer vendor/friendsofphp/php-cs-fixer/php-cs-fixer check

0 comments on commit cd5d819

Please sign in to comment.