|
| 1 | +--- |
| 2 | +name: pipeline |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + pull-requests: write |
| 14 | + |
| 15 | +jobs: |
| 16 | + tests: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + php: ['8.2', '8.3', '8.4'] |
| 21 | + dependencies: ['lowest', 'highest'] |
| 22 | + steps: |
| 23 | + - name: Checkout |
| 24 | + uses: actions/checkout@v4 |
| 25 | + |
| 26 | + - name: Setup PHP |
| 27 | + uses: shivammathur/setup-php@v2 |
| 28 | + with: |
| 29 | + php-version: ${{ matrix.php }} |
| 30 | + coverage: "none" |
| 31 | + |
| 32 | + - name: Install Composer |
| 33 | + uses: "ramsey/composer-install@v3" |
| 34 | + with: |
| 35 | + dependency-versions: "${{ matrix.dependencies }}" |
| 36 | + |
| 37 | + - name: Composer Validation |
| 38 | + run: composer validate --strict |
| 39 | + |
| 40 | + - name: Install PHP Dependencies |
| 41 | + run: composer install --no-scripts |
| 42 | + |
| 43 | + - name: Tests |
| 44 | + run: vendor/bin/phpunit |
| 45 | + |
| 46 | + qa: |
| 47 | + runs-on: ubuntu-latest |
| 48 | + steps: |
| 49 | + - name: Checkout |
| 50 | + uses: actions/checkout@v4 |
| 51 | + |
| 52 | + - name: Conventional Commit |
| 53 | + |
| 54 | + if: github.event_name == 'pull_request' |
| 55 | + with: |
| 56 | + task_types: '["feat", "fix", "docs", "test", "ci", "style", "refactor", "perf", "chore", "revert"]' |
| 57 | + add_label: 'true' |
| 58 | + custom_labels: '{"feat": "feature", "fix": "bug", "docs": "documentation", "test": "test", "ci": "CI/CD", "style": "codestyle", "refactor": "refactor", "perf": "performance", "chore": "chore", "revert": "revert"}' |
| 59 | + |
| 60 | + - name: Setup PHP |
| 61 | + uses: shivammathur/setup-php@v2 |
| 62 | + with: |
| 63 | + php-version: '8.2' |
| 64 | + coverage: "none" |
| 65 | + |
| 66 | + - name: Install Composer |
| 67 | + uses: "ramsey/composer-install@v3" |
| 68 | + |
| 69 | + - name: Composer Validation |
| 70 | + run: composer validate --strict |
| 71 | + |
| 72 | + - name: Install PHP Dependencies |
| 73 | + run: composer install --no-scripts |
| 74 | + |
| 75 | + - name: Code Style PHP |
| 76 | + run: vendor/bin/php-cs-fixer fix --dry-run |
| 77 | + |
| 78 | + - name: Rector |
| 79 | + run: vendor/bin/rector --dry-run |
| 80 | + |
| 81 | + - name: PHPStan |
| 82 | + run: vendor/bin/phpstan analyse |
0 commit comments