diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ee111f8..8a93076 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,17 +11,16 @@ jobs: strategy: fail-fast: false matrix: - php: [7.4, 7.3] + php: [8.1, 8.0, 7.4] os: [ubuntu-latest] name: PHP${{ matrix.php }} on ${{ matrix.os }} steps: - - name: Checkout code - uses: actions/checkout@v1 - - - name: Checkout submodules - uses: textbook/git-checkout-submodule-action@master + - name: Checkout repository and submodules + uses: actions/checkout@v2 + with: + submodules: recursive - name: Cache dependencies uses: actions/cache@v1 @@ -30,7 +29,7 @@ jobs: key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - name: Setup PHP - uses: shivammathur/setup-php@v1 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysqli, pdo_mysql, bcmath, intl, gd, exif, iconv, imagick @@ -40,8 +39,11 @@ jobs: run: | composer update --prefer-stable --prefer-dist --no-interaction --no-suggest - name: Execute CS check + env: + PHP_CS_FIXER_IGNORE_ENV: 1 run: vendor/bin/php-cs-fixer fix --dry-run - name: Execute tests env: - HUBSPOT_API_KEY: ${{secrets.HUBSPOT_KEY}} + HUBSPOT_API_KEY: ${{secrets.HUBSPOT_PRIVATE_APP_KEY}} + HUBSPOT_USE_OAUTH2: true run: vendor/bin/phpunit \ No newline at end of file diff --git a/.php_cs.dist b/.php_cs.dist index 5ea960a..88cc422 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -10,6 +10,7 @@ return PhpCsFixer\Config::create() '@Symfony' => true, '@PSR2' => true, 'array_syntax' => ['syntax' => 'short'], + 'php_unit_method_casing' => ['case' => 'snake_case'], ]) ->setIndent("\t") ->setLineEnding("\r\n") diff --git a/tests/Unit/ServiceProviderTest.php b/tests/Unit/ServiceProviderTest.php index a7b8fbf..8548d2d 100644 --- a/tests/Unit/ServiceProviderTest.php +++ b/tests/Unit/ServiceProviderTest.php @@ -22,7 +22,7 @@ public function test_api_key_set() $this->assertEquals(env('HUBSPOT_API_KEY'), $hubspot->getClient()->key); } - public function test_oauth2_client_is_built() + public function test_oauth2_client_is_built() { Config::set('hubspot.use_oauth2', true); Config::set('hubspot.api_key', 'FooBarBaz');