fix line exceeds by phpcs warning #35
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| tools: composer, phpstan, phpcs, phpunit | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ hashFiles('composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php- | |
| - name: Install dependencies with Composer | |
| run: composer install --no-progress --prefer-dist | |
| - name: Static Analysis (PHPStan) | |
| run: vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=512M | |
| - name: Code Style Check (PHPCS) | |
| run: vendor/bin/phpcs --standard=phpcs.xml.dist | |
| - name: Automatic generation of OpenAPI schema | |
| run: php generate-schema.php yaml | |
| - name: Verify schema file exists | |
| run: ls -la schema/openapi.yaml | |
| - name: Upload schema | |
| if: hashFiles('schema/openapi.yaml') != '' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: openapi-schema | |
| path: schema/openapi.yaml | |
| - name: Start the API server | |
| run: php start_server.php & | |
| - name: Automated test execution (PHPUnit) | |
| run: vendor/bin/phpunit |