bump: all (#156) #221
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
jobs: | |
CodeQualityAnalysis: | |
runs-on: ubuntu-latest | |
env: | |
PHP_VERSION: ${{ matrix.php }} | |
strategy: | |
matrix: | |
php: [ "8.1", "8.2", "8.3" ] | |
steps: | |
- | |
name: Repo checkout | |
uses: actions/checkout@v3 | |
- | |
name: Install dependencies | |
run: make composer/install | |
- | |
name: Run code quality analysis | |
run: make analyze | |
TestArchive: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Repo checkout | |
uses: actions/checkout@v3 | |
- | |
name: Compare resources/ folder against Git archive | |
run: | | |
FOLDER_FILES=$(find resources/ -type f | sort) | |
git archive --output=archive.zip HEAD && ZIP_FILES=$(zipinfo -1 archive.zip | grep resources/ | grep -v /$ | sort) && rm -f archive.zip | |
DIFF=$(diff <(echo "$FOLDER_FILES") <(echo "$ZIP_FILES") | tr -d '\n') | |
[ -n "$DIFF" ] && echo "There are files missing from the zip archive:" && echo "$DIFF" && exit 1 || echo OK | |
Test: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ] | |
steps: | |
- | |
name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
extensions: mbstring, intl | |
coverage: xdebug | |
ini-values: post_max_size=256M, max_execution_time=180, xdebug.mode=develop | |
- | |
name: Repo checkout | |
uses: actions/checkout@v3 | |
- | |
name: Install dependencies | |
run: composer install --prefer-dist | |
- | |
name: Run PHPUnit | |
run: vendor/bin/phpunit |