Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from dew-serverless/github-actions-integration-…
Browse files Browse the repository at this point in the history
…test

Fix integration test
  • Loading branch information
lizhineng authored Nov 4, 2023
2 parents 20eda44 + ab50ca1 commit 28e784b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: ['8.1', '8.2']
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}
name: Integration Test

steps:
- name: Checkout
Expand All @@ -23,12 +18,12 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: '8.2'
tools: composer:v2
coverage: none

- name: Install Dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi
run: composer update --prefer-stable --no-interaction --no-progress --ansi

- name: Run Test Cases
run: composer run test:integration
Expand Down
4 changes: 3 additions & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ function result(array $data, int $status = 200): Result

function integrationTestEnabled(): bool
{
return getenv('INTEGRATION_TEST_ENABLED') === '1';
$value = getenv('INTEGRATION_TEST_ENABLED');

return filter_var($value, FILTER_VALIDATE_BOOLEAN);
}

0 comments on commit 28e784b

Please sign in to comment.