Skip to content

Commit

Permalink
Move from Travis CI to Github Actions (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanlaak authored Jun 23, 2021
1 parent e94a8fa commit 58992db
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 39 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
36 changes: 35 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Static code analysis
name: Tests

on: [pull_request]

Expand All @@ -11,3 +11,37 @@ jobs:
uses: docker://jakzal/phpqa
with:
args: phpstan analyze
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.2', '7.4', '8.0']
symfony: ['4.4.*', '5.3.*']
name: Test on Symfony ${{ matrix.symfony }} with PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov
- run: composer require symfony/framework-bundle:${{ matrix.symfony }} --no-update
- run: composer require symfony/form:${{ matrix.symfony }} --no-update
- run: composer install
- run: make test
test-lowest:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.2', '7.3']
symfony: ['3.4.*', '4.4.*']
name: Test lowest on Symfony ${{ matrix.symfony }} with PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov
- run: composer require symfony/framework-bundle:${{ matrix.symfony }} --no-update
- run: composer require symfony/form:${{ matrix.symfony }} --no-update
- run: composer install
- run: make test-lowest
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ phpstan:

phpstan-baseline:
docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) phpstan analyze --error-format baselineNeon > phpstan-baseline.neon

test:
composer update --prefer-dist --no-interaction ${COMPOSER_PARAMS}
vendor/bin/phpunit

test-lowest:
COMPOSER_PARAMS='--prefer-lowest' $(MAKE) test
3 changes: 0 additions & 3 deletions Tests/AbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ protected function tearDown(): void
protected function createEntityManager()
{
$config = new Configuration();
$cache = new \Doctrine\Common\Cache\ArrayCache();
$config->setQueryCacheImpl($cache);
$config->setProxyDir(sys_get_temp_dir());
$config->setProxyNamespace('EntityProxy');
$config->setAutoGenerateProxyClasses(true);
Expand All @@ -48,7 +46,6 @@ protected function createEntityManager()
[__DIR__.'/../Entity']
);
$config->setMetadataDriverImpl($driver);
$config->setMetadataCacheImpl($cache);

$conn = [
'driver' => 'pdo_sqlite',
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"psr/cache": "^1.0",
"symfony/framework-bundle": "^3.4 || ^4.3 || ^5.0",
"symfony/form": "^3.4 || ^4.3 || ^5.0",
"doctrine/orm": "^2.6"
"doctrine/orm": "^2.6.3|^2.7"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
Expand Down

0 comments on commit 58992db

Please sign in to comment.