Add documentation #6
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: ~ | |
| jobs: | |
| test: | |
| name: "Test (PHP ${{ matrix.php-versions }}, Neos ${{ matrix.neos-versions }})" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-versions: ['8.1'] | |
| neos-versions: ['7.3', '8.3'] | |
| include: | |
| - php-versions: '8.2' | |
| neos-versions: '8.3' | |
| - php-versions: '8.3' | |
| neos-versions: '8.3' | |
| runs-on: ubuntu-latest | |
| env: | |
| FLOW_CONTEXT: Testing | |
| NEOS_FOLDER: neos/ | |
| DIST_FOLDER: DistributionPackages/CodeQ.AssetHelpers | |
| steps: | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite, mysql, pgsql, redis, memcached, memcache, apcu | |
| ini-values: date.timezone="Africa/Tunis", opcache.fast_shutdown=0, apc.enable_cli=on | |
| - name: Install Neos Project and other dependencies | |
| run: | | |
| composer create --no-scripts --no-install neos/neos-base-distribution "${{ env.NEOS_FOLDER }}" "^${{ matrix.neos-versions }}" | |
| cd "${{ env.NEOS_FOLDER }}" | |
| composer require phpstan/phpstan "^1.10.0" --no-install --dev | |
| composer require squizlabs/php_codesniffer "^3.7" --no-install --dev | |
| composer config --no-plugins allow-plugins.neos/composer-plugin true | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| path: ${{ env.NEOS_FOLDER }}${{ env.DIST_FOLDER }} | |
| - name: Finish composer setup | |
| run: | | |
| cd "${{ env.NEOS_FOLDER }}" | |
| composer config repositories.assethelpers '{ "type": "path", "url": "./${{ env.DIST_FOLDER }}", "options": { "symlink": false } }' | |
| composer require codeq/assethelpers "@dev" --no-install | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/composer | |
| ~/${{ env.NEOS_FOLDER }}Packages | |
| key: php-${{ matrix.php-versions }}-${{ matrix.dependencies }}${{ hashFiles('**/composer.json') }} | |
| restore-keys: php-${{ matrix.php-versions }}-${{ matrix.dependencies }} | |
| - name: Install dependencies | |
| run: | | |
| cd ${{ env.NEOS_FOLDER }} | |
| composer ${{ matrix.dependencies == 'locked' && 'install' || 'update' }} --no-progress --no-interaction ${{ matrix.dependencies == 'lowest' && '--prefer-lowest' || '' }} ${{ matrix.composer-arguments }} | |
| - name: Set Flow Context | |
| run: echo "FLOW_CONTEXT=${{ env.FLOW_CONTEXT }}" >> $GITHUB_ENV | |
| - name: Run style tests | |
| run: | | |
| cd "${{ env.NEOS_FOLDER }}" | |
| bin/phpcs --colors -n --standard=PSR12 ${{ env.DIST_FOLDER }}/Classes | |
| - name: Run stan tests | |
| run: | | |
| cd "${{ env.NEOS_FOLDER }}" | |
| bin/phpstan analyse ${{ env.DIST_FOLDER }}/Classes |