Skip to content

Commit 1b9dfa2

Browse files
authored
[CI] Moved to Github Actions (#356)
1 parent 3e1b9e3 commit 1b9dfa2

147 files changed

Lines changed: 195 additions & 808 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Browser tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "[0-9]+.[0-9]+"
8+
pull_request: ~
9+
10+
jobs:
11+
core-web:
12+
name: "Core Web suite"
13+
uses: ezsystems/ezplatform/.github/workflows/callable-browser-tests.yaml@2.5
14+
with:
15+
test-suite: "--mode=standard --profile=repository-forms --non-strict"
16+
php-image: "ezsystems/php:7.1-v1"
17+
secrets:
18+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/ci.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+'
8+
pull_request: ~
9+
10+
jobs:
11+
cs-fix:
12+
name: Run code style check
13+
runs-on: "ubuntu-20.04"
14+
strategy:
15+
matrix:
16+
php:
17+
- '7.4'
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup PHP Action
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
coverage: none
26+
extensions: 'pdo_sqlite, gd'
27+
tools: cs2pr
28+
29+
- uses: "ramsey/composer-install@v1"
30+
with:
31+
dependency-versions: "highest"
32+
33+
- name: Run code style check
34+
run: composer run-script check-cs -- --format=checkstyle | cs2pr
35+
36+
tests:
37+
name: Unit tests
38+
runs-on: "ubuntu-20.04"
39+
timeout-minutes: 15
40+
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
php:
45+
- '7.1'
46+
- '7.3'
47+
- '7.4'
48+
49+
steps:
50+
- uses: actions/checkout@v2
51+
52+
- name: Setup PHP Action
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: ${{ matrix.php }}
56+
coverage: none
57+
extensions: pdo_sqlite, gd
58+
tools: cs2pr
59+
60+
- uses: "ramsey/composer-install@v1"
61+
with:
62+
dependency-versions: "highest"
63+
64+
- name: Setup problem matchers for PHPUnit
65+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
66+
67+
- name: Run unit test suite
68+
run: composer test

.travis.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

bin/.travis/composer-auth.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

bin/.travis/prepare_ezplatform.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

bin/.travis/prepare_unittest.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

bundle/Controller/ContentEditController.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,13 @@ public function __construct(
4343

4444
/**
4545
* Displays and processes a content creation form. Showing the form does not create a draft in the repository.
46-
*
47-
* @param \EzSystems\RepositoryForms\Content\View\ContentCreateView $view
48-
*
49-
* @return \EzSystems\RepositoryForms\Content\View\ContentCreateView
5046
*/
5147
public function createWithoutDraftAction(ContentCreateView $view): ContentCreateView
5248
{
5349
return $view;
5450
}
5551

5652
/**
57-
* @param \EzSystems\RepositoryForms\Content\View\ContentCreateSuccessView $view
58-
*
59-
* @return \EzSystems\RepositoryForms\Content\View\ContentCreateSuccessView
60-
*
6153
* @throws \eZ\Publish\API\Repository\Exceptions\BadStateException
6254
*/
6355
public function createWithoutDraftSuccessAction(ContentCreateSuccessView $view): ContentCreateSuccessView
@@ -72,7 +64,6 @@ public function createWithoutDraftSuccessAction(ContentCreateSuccessView $view):
7264
* @param int $fromVersionNo
7365
* @param string $fromLanguage
7466
* @param string $toLanguage
75-
* @param \Symfony\Component\HttpFoundation\Request $request
7667
*
7768
* @return \EzSystems\RepositoryForms\Content\View\ContentCreateDraftView|\Symfony\Component\HttpFoundation\Response
7869
*
@@ -125,10 +116,6 @@ public function createContentDraftAction(
125116
}
126117

127118
/**
128-
* @param \EzSystems\RepositoryForms\Content\View\ContentEditView $view
129-
*
130-
* @return \EzSystems\RepositoryForms\Content\View\ContentEditView
131-
*
132119
* @throws \eZ\Publish\API\Repository\Exceptions\BadStateException
133120
*/
134121
public function editVersionDraftAction(ContentEditView $view): ContentEditView
@@ -137,10 +124,6 @@ public function editVersionDraftAction(ContentEditView $view): ContentEditView
137124
}
138125

139126
/**
140-
* @param \EzSystems\RepositoryForms\Content\View\ContentEditSuccessView $view
141-
*
142-
* @return \EzSystems\RepositoryForms\Content\View\ContentEditSuccessView
143-
*
144127
* @throws \eZ\Publish\API\Repository\Exceptions\BadStateException
145128
*/
146129
public function editVersionDraftSuccessAction(ContentEditSuccessView $view): ContentEditSuccessView

bundle/Controller/UserController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use eZ\Publish\API\Repository\UserService;
1818
use eZ\Publish\Core\Base\Exceptions\InvalidArgumentException;
1919
use eZ\Publish\Core\Base\Exceptions\InvalidArgumentType;
20+
use eZ\Publish\Core\Base\Exceptions\UnauthorizedException as CoreUnauthorizedException;
2021
use eZ\Publish\Core\MVC\Symfony\Locale\UserLanguagePreferenceProviderInterface;
2122
use EzSystems\RepositoryForms\Data\Mapper\UserCreateMapper;
2223
use EzSystems\RepositoryForms\Data\Mapper\UserUpdateMapper;
@@ -33,7 +34,6 @@
3334
use Symfony\Component\OptionsResolver\Exception\NoSuchOptionException;
3435
use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException;
3536
use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException;
36-
use eZ\Publish\Core\Base\Exceptions\UnauthorizedException as CoreUnauthorizedException;
3737

3838
class UserController extends Controller
3939
{
@@ -82,7 +82,6 @@ public function __construct(
8282
* @param string $contentTypeIdentifier ContentType id to create
8383
* @param string $language Language code to create the content in (eng-GB, ger-DE, ...))
8484
* @param int $parentLocationId Location the content should be a child of
85-
* @param Request $request
8685
*
8786
* @return UserCreateView|Response
8887
*
@@ -144,7 +143,6 @@ public function createAction(
144143
* @param int $contentId ContentType id to create
145144
* @param int $versionNo Version number the version should be created from. Defaults to the currently published one.
146145
* @param string $language Language code to create the version in (eng-GB, ger-DE, ...))
147-
* @param Request $request
148146
*
149147
* @return UserUpdateView|Response
150148
*

bundle/Controller/UserRegisterController.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,12 @@ class UserRegisterController extends Controller
1919
/** @var \EzSystems\EzPlatformUserBundle\Controller\UserRegisterController */
2020
private $userRegisterController;
2121

22-
/**
23-
* @param \EzSystems\EzPlatformUserBundle\Controller\UserRegisterController $userRegisterController
24-
*/
2522
public function __construct(BaseUserRegisterController $userRegisterController)
2623
{
2724
$this->userRegisterController = $userRegisterController;
2825
}
2926

3027
/**
31-
* @param \Symfony\Component\HttpFoundation\Request $request
32-
*
3328
* @return \EzSystems\EzPlatformUser\View\Register\FormView|\Symfony\Component\HttpFoundation\Response|null
3429
*
3530
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType

bundle/DependencyInjection/Compiler/FieldTypeFormMapperDispatcherPass.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
*/
99
namespace EzSystems\RepositoryFormsBundle\DependencyInjection\Compiler;
1010

11+
use LogicException;
1112
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1213
use Symfony\Component\DependencyInjection\ContainerBuilder;
13-
use LogicException;
1414
use Symfony\Component\DependencyInjection\Reference;
1515

1616
/**
@@ -29,9 +29,7 @@ public function process(ContainerBuilder $container)
2929
foreach ($this->findTaggedFormMapperServices($container) as $id => $tags) {
3030
foreach ($tags as $tag) {
3131
if (!isset($tag['fieldType'])) {
32-
throw new LogicException(
33-
'ez.fieldFormMapper service tags need a "fieldType" attribute to identify which field type the mapper is for. None given.'
34-
);
32+
throw new LogicException('ez.fieldFormMapper service tags need a "fieldType" attribute to identify which field type the mapper is for. None given.');
3533
}
3634

3735
$dispatcherDefinition->addMethodCall('addMapper', [new Reference($id), $tag['fieldType']]);
@@ -42,8 +40,6 @@ public function process(ContainerBuilder $container)
4240
/**
4341
* Gathers services tagged as either ez.fieldFormMapper.value or ez.fieldFormMapper.definition.
4442
*
45-
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
46-
*
4743
* @return array
4844
*/
4945
private function findTaggedFormMapperServices(ContainerBuilder $container)

0 commit comments

Comments
 (0)