Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Jan 28, 2024
1 parent a5c6059 commit 3724e2c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Check out code
uses: actions/checkout@v4
if: steps.pull.outcome != 'success'
- name: Install dependencies
run: |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \
composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }}
- name: Run tests
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \
vendor/bin/phpunit ${{ env.COVERAGE }}
run: |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \
vendor/bin/phpunit ${{ env.COVERAGE }}
env:
COVERAGE: ${{ matrix.coverage && '--coverage-clover=coverage.xml' || '' }}
- name: Upload code coverage
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,24 @@ jobs:
phpstan:
runs-on: ubuntu-latest

strategy:
matrix:
php: [ 8.3 ]
release: [ stable ]

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.cache/composer/files
key: php-8.3-composer-${{ hashFiles('**/composer.json') }}
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- run: composer update --no-interaction --no-progress --prefer-dist
- run: vendor/bin/phpstan analyse --error-format=github
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \
composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }}
- name: Analyse code
run: |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \
vendor/bin/phpstan analyse --error-format=github

0 comments on commit 3724e2c

Please sign in to comment.