-
Notifications
You must be signed in to change notification settings - Fork 103
WIP - Introduce tests on platforms #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
name: "Test on platforms" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "1.3.x" | ||
|
||
jobs: | ||
test-mysql: | ||
name: "Tests mysql" | ||
runs-on: "ubuntu-latest" | ||
|
||
env: | ||
DATABASE_URL: mysql://root@127.0.0.1:3306/phpstan_doctrine | ||
|
||
services: | ||
mysql: | ||
image: mysql:${{ matrix.mysql-version }} | ||
options: >- | ||
--health-cmd "mysqladmin ping --silent" | ||
--name=mysqlcontainer | ||
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes | ||
-e MYSQL_DATABASE=phpstan_doctrine | ||
ports: | ||
- 3306:3306 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- "8.2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We definitelly need to check "before 8.1" and "after 8.1" as there were some major changes. |
||
mysql-version: | ||
- '5.7' | ||
- '8.0' | ||
VincentLanglet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
ini-file: development | ||
extensions: "mongodb" | ||
|
||
- name: "Install dependencies" | ||
run: "composer update --no-interaction --no-progress" | ||
|
||
- name: Change mysql sql_mode | ||
run: "docker exec mysqlcontainer mysql -u root -e \"SET GLOBAL sql_mode = '';\"" | ||
|
||
- name: "Tests" | ||
run: "vendor/bin/phpunit --group=mysql" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace PHPStan\Type\Doctrine\Query; | ||
|
||
/** | ||
* @group platform | ||
* @group mysql | ||
*/ | ||
class MysqlQueryResultTypeWalkerTest extends PDOQueryResultTypeWalkerTest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently I extends PDOQueryResultTypeWalkerTest but later we'll work his own dataprovider |
||
{ | ||
|
||
protected static function getEntityManagerPath(): string | ||
{ | ||
return __DIR__ . '/../data/QueryResult/entity-manager-mysql.php'; | ||
} | ||
|
||
} |
Uh oh!
There was an error while loading. Please reload this page.