Add api violation exception #16
This file contains 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: PHP Composer | |
on: | |
push: | |
branches: [ "main", "develop"] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
coverage: xdebug | |
ini-values: xdebug.mode=coverage | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Check code style | |
run: php vendor/bin/phpcs | |
- name: Run test suite | |
run: php vendor/bin/phpunit --coverage-clover coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: lbacik/jsonhub-sdk-php | |
file: coverage.xml | |
fail_ci_if_error: true |