Merge pull request #261 from bmlt-enabled/feature/curl-health-check #51
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: | |
| lint: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out code 🛒 | |
| uses: actions/checkout@v6 | |
| id: code-checkout | |
| - name: Setup PHP 🐫 | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.2 | |
| - name: Validate composer.json and composer.lock 🎼 | |
| id: composer-validate | |
| run: composer validate | |
| - name: PHPCS checker 🧹 | |
| id: php-codesniffer | |
| run: make lint | |
| test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out code 🛒 | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP 🐫 | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.2 | |
| extensions: xdebug | |
| coverage: xdebug | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies 📦 | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run tests 🧪 | |
| run: make test | |
| coverage: | |
| runs-on: ubuntu-24.04 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Check out code 🛒 | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP 🐫 | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.2 | |
| extensions: xdebug | |
| coverage: xdebug | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies 📦 | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run tests with coverage 🧪 | |
| run: make coverage | |
| - name: Upload coverage to Codecov ☂️ | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-mayo | |
| fail_ci_if_error: false |