Skip to content

Commit

Permalink
Merge pull request #18 from ray-di/fix-gh
Browse files Browse the repository at this point in the history
Add php 7.3 and 7.4 tests in GH action
  • Loading branch information
koriym authored Oct 7, 2021
2 parents ba3c7a2 + 59841eb commit 1e40c56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
operating-system:
- ubuntu-latest
php-version:
- '7.3'
- '7.4'
- '8.0'
dependencies:
- highest
Expand Down Expand Up @@ -58,4 +60,5 @@ jobs:
file: ./coverage.xml

- name: Run Demo
if: ${{ matrix.php-version == '8.0' }}
run: php demo/run.php
2 changes: 1 addition & 1 deletion tests/DbQueryModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function setUp(): void
$sqlDir = dirname(__DIR__) . '/tests/sql';
$dbQueryConfig = new DbQueryConfig($sqlDir);
$module = new MediaQueryModule($mediaQueries, [$dbQueryConfig], new AuraSqlModule('sqlite::memory:'));
$this->injector = new Injector($module);
$this->injector = new Injector($module, __DIR__ . '/tmp');
$pdo = $this->injector->getInstance(ExtendedPdoInterface::class);
assert($pdo instanceof ExtendedPdoInterface);
$pdo->query((string) file_get_contents($sqlDir . '/create_todo.sql'));
Expand Down
7 changes: 6 additions & 1 deletion tests/Fake/Queries/TodoConstcuctEntityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@

interface TodoConstcuctEntityInterface
{
/**
* @DbQuery(id="todo_item", entity=TodoConstruct::class)
*/
#[DbQuery('todo_item', entity: TodoConstruct::class)]
public function getItem(string $id): TodoConstruct;

/** @return list<Todo> */
/**
* @DbQuery(id="todo_list", entity=TodoConstruct::class)
*/
#[DbQuery('todo_list', entity: TodoConstruct::class)]
public function getlist(): array;
}

0 comments on commit 1e40c56

Please sign in to comment.