setup #12
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 | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.1" # Change to your project's PHP version | |
| - name: Install Composer dependencies | |
| run: composer install --no-dev --prefer-dist | |
| - name: Run tests | |
| run: vendor/bin/phpunit # Ensure you have PHPUnit set up | |
| - name: Lint PHP code | |
| run: composer run-script lint # Ensure a lint script is in your composer.json |