fix(deps): update symfony packages to v6 #786
Workflow file for this run
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
name: Build and test | |
on: | |
push: | |
branches-ignore: [gh-pages] | |
# pull_request: | |
# branches-ignore: [gh-pages] | |
jobs: | |
build: | |
name: Build (PHP ${{ matrix.php-versions }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['8.1']#, '8.2'] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
# Docs: https://github.com/shivammathur/setup-php | |
- name: Setup PHP with PCOV | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
tools: php-cs-fixer, phpunit-bridge | |
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql | |
coverage: pcov | |
#ini-values: post_max_size=256M, max_execution_time=180 | |
- name: Start mysql service | |
run: sudo systemctl start mysql | |
- name: Get composer cache directory | |
id: composer-cache | |
run: | | |
dir="$(composer config cache-files-dir)" | |
echo "dir=$dir" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install composer dependencies | |
run: composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Extract English translations | |
run: php bin/console translation:extract zikula en -vvv | |
test: | |
name: Tests (PHP ${{ matrix.php-versions }}) | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
php-versions: ['8.1']#, '8.2'] | |
services: | |
mysql: | |
image: mysql:latest | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: false | |
MYSQL_ROOT_PASSWORD: 12345678 | |
#MYSQL_DATABASE: zk_test | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install composer dependencies | |
run: composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Run linter | |
run: | | |
php bin/console lint:container | |
php bin/console lint:yaml config/ | |
php bin/console lint:yaml src/system/ --parse-tags | |
php bin/console lint:yaml src/Zikula/ --parse-tags | |
php bin/console lint:twig --show-deprecations src/system/ src/Zikula/ | |
- name: Cache vulnerability database | |
uses: actions/cache@v3 | |
id: cache-db | |
with: | |
path: ~/.symfony/cache | |
key: db | |
- name: Run security checker | |
uses: symfonycorp/security-checker-action@v5 | |
# - name: Run Migration | |
# run: | | |
# composer require --dev symfony/orm-pack | |
# php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed" | |
# php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed" | |
# env: | |
# DATABASE_URL: mysql://root:zikula@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/zk_test | |
- name: Install PHPUnit | |
run: ./vendor/bin/simple-phpunit install | |
- name: Run unit tests | |
run: ./vendor/bin/simple-phpunit --coverage-text | |
- name: Test installation | |
run: ./.github/scripts/testInstall.sh | |
docs: | |
name: Documentation | |
if: github.ref_name == 'main' | |
runs-on: ubuntu-latest | |
needs: [build, test] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install composer dependencies | |
run: composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Dump vendors into doc | |
run: ./build.php build:generate_vendor_doc --write-to "docs/General/VendorInformation.md" | |
# GH action not possible yet | |
# see https://github.com/CouscousPHP/Couscous/issues/263 | |
# see https://github.com/CouscousPHP/Couscous/issues/265 | |
- name: Build docs | |
#uses: CouscousPHP/GitHub-Action@v1 | |
run: | | |
wget https://github.com/CouscousPHP/Couscous/archive/refs/heads/master.zip | |
unzip master.zip && rm master.zip | |
cd Couscous-master && composer install && cd .. | |
Couscous-master/bin/couscous generate | |
rm -rf Couscous-master/ | |
- name: Deploy docs | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./.couscous/generated | |
create-artifacts: | |
name: Package | |
runs-on: ubuntu-latest | |
needs: [build, test, docs] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Build release artifacts | |
run: ./.github/scripts/buildReleaseArtifacts.sh | |
# see https://github.com/actions/upload-artifact | |
- name: Upload release artifacts | |
uses: actions/upload-artifact@master | |
with: | |
name: release-archives | |
path: './build_work/archive' |