Skip to content

Commit

Permalink
Merge pull request #36 from rossjcooper/fix-workflow
Browse files Browse the repository at this point in the history
Update workflow to support latest php
  • Loading branch information
rossjcooper authored Nov 12, 2022
2 parents 1bb984d + 2ad2cef commit 441ce67
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 441ce67

Please sign in to comment.