fix: debug events, multi instance, deprecation warnings #75
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: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| run: | |
| if: '!contains(toJSON(github.event.commits.*.message), ''[skip-ci]'')' | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| matrix: | |
| operating-system: [ubuntu-latest] | |
| php-versions: [ '7.0', '7.4', '8.0', '8.1', '8.2', '8.3' ] | |
| name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: intl #optional | |
| ini-values: "post_max_size=256M" #optional | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| 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 | |
| - name: Run tests for PHP version 7.0 | |
| if: matrix.php-versions == '7.0' | |
| run: | | |
| mkdir -p build/logs | |
| ./vendor/bin/phpunit ./tests-7.0 | |
| - name: Run tests for PHP versions >= 7.4 | |
| if: matrix.php-versions == '7.4' || matrix.php-versions == '8.0' || matrix.php-versions == '8.1' || matrix.php-versions == '8.2' || matrix.php-versions == '8.3' | |
| run: | | |
| mkdir -p build/logs | |
| ./vendor/bin/phpunit --coverage-clover coverage.xml ./tests | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Notification | |
| if: always() | |
| id: slack | |
| uses: wingify/slack-github-action@v1.15.1-wingify | |
| with: | |
| channel-id: "vwo-fs-fme-sdk-job-status" | |
| slack-message: "<!here> Test on *PHP-${{ matrix.php-versions }}* and *${{ matrix.operating-system }}* got *${{job.status}}* ${{job.status == 'success' && ':heavy_check_mark:' || ':x:'}} \nCommit: `${{github.event.head_commit.message}}`. \nCheck the latest build: https://github.com/wingify/vwo-fme-php-sdk/actions" | |
| color: "${{job.status == 'success' && '#00FF00' || '#FF0000'}}" | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |