From f34cfb701b992c37df0460c6a381097d4f3e1be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Uzna=C5=84ski?= Date: Tue, 7 Jul 2020 16:33:34 +0200 Subject: [PATCH] [CLEANUP] Fix yaml files (#70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Łukasz Uznański --- .github/workflows/ci.yml | 276 ++++++++++++++++++--------------------- Configuration/TsLint.yml | 28 ++-- codeception.yml | 61 ++++----- 3 files changed, 174 insertions(+), 191 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef69bf9..d30cea2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,188 +1,166 @@ +--- +name: CI on: - pull_request - push - -name: CI - jobs: php-lint: - name: PHP linter - + name: "PHP linter" runs-on: ubuntu-latest - + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: "Install PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php-version }}" + - name: "Run PHP lint" + run: "composer ci:php:lint" strategy: matrix: php-version: - 7.2 - 7.3 - 7.4 - - steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - - - name: Run PHP lint - run: composer ci:php:lint - code-quality: - name: Code quality checks - + name: "Code quality checks" runs-on: ubuntu-latest - + steps: + - + name: Checkout + uses: actions/checkout@v1 + - + name: "Install PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php-version }}" + - + name: "Cache dependencies installed with composer" + uses: actions/cache@v1 + with: + key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" + path: ~/.composer/cache + restore-keys: "php${{ matrix.php-version }}-composer-\n" + - + name: "Install Composer dependencies" + run: "composer install --no-progress" + - + name: "Run command" + run: "composer ci:${{ matrix.command }}" strategy: matrix: command: - - ts:lint - - php:sniff + - "ts:lint" + - "php:sniff" php-version: - 7.3 - - steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - - - name: "Cache dependencies installed with composer" - uses: actions/cache@v1 - with: - path: ~/.composer/cache - key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer- - - - name: Install Composer dependencies - run: composer install --no-progress - - - name: Run command - run: composer ci:${{ matrix.command }} - unit-tests: - name: Unit tests - + name: "Unit tests" runs-on: ubuntu-latest - + steps: + - + name: Checkout + uses: actions/checkout@v1 + - + name: "Install PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php-version }}" + - + name: "Cache dependencies installed with composer" + uses: actions/cache@v1 + with: + key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" + path: ~/.composer/cache + restore-keys: "php${{ matrix.php-version }}-composer-\n" + - + env: + TYPO3: "${{ matrix.typo3-version }}" + name: "Install TYPO3 Core" + run: | + composer require typo3/minimal:"$TYPO3" + composer show + - + if: "matrix.composer-dependencies == 'lowest'" + name: "Install lowest dependencies with composer" + run: | + composer update --no-ansi --no-interaction --no-progress --no-suggest --prefer-lowest + composer show + - + if: "matrix.composer-dependencies == 'highest'" + name: "Install highest dependencies with composer" + run: | + composer update --no-ansi --no-interaction --no-progress --no-suggest + composer show + - + name: "Run unit tests" + run: "composer ci:tests:unit" strategy: matrix: - typo3-version: - - "^9.5" - #- "^10.4" composer-dependencies: - highest - #- lowest php-version: - 7.2 - 7.3 - 7.4 - - steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - - - name: Cache dependencies installed with composer - uses: actions/cache@v1 - with: - path: ~/.composer/cache - key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer- - - - name: Install TYPO3 Core - env: - TYPO3: ${{ matrix.typo3-version }} - run: | - composer require typo3/minimal:"$TYPO3" - composer show - - - name: Install lowest dependencies with composer - if: matrix.composer-dependencies == 'lowest' - run: | - composer update --no-ansi --no-interaction --no-progress --no-suggest --prefer-lowest - composer show - - - name: Install highest dependencies with composer - if: matrix.composer-dependencies == 'highest' - run: | - composer update --no-ansi --no-interaction --no-progress --no-suggest - composer show - - - name: Run unit tests - run: composer ci:tests:unit - + typo3-version: + - ^9.5 functional-tests: - name: Functional tests - + name: "Functional tests" runs-on: ubuntu-latest - + steps: + - + name: Checkout + uses: actions/checkout@v1 + - + name: "Install PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php-version }}" + - + name: "Cache dependencies installed with composer" + uses: actions/cache@v1 + with: + key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" + path: ~/.composer/cache + restore-keys: "php${{ matrix.php-version }}-composer-\n" + - + env: + TYPO3: "${{ matrix.typo3-version }}" + name: "Install TYPO3 Core" + run: | + composer require typo3/minimal:"$TYPO3" + composer show + - + if: "matrix.composer-dependencies == 'lowest'" + name: "Install lowest dependencies with composer" + run: | + composer update --no-ansi --no-interaction --no-progress --no-suggest --prefer-lowest + composer show + - + if: "matrix.composer-dependencies == 'highest'" + name: "Install highest dependencies with composer" + run: | + composer update --no-ansi --no-interaction --no-progress --no-suggest + composer show + - + name: "Start MySQL" + run: "sudo /etc/init.d/mysql start" + - + name: "Run functional tests" + run: |- + export typo3DatabaseName="typo3"; + export typo3DatabaseHost="127.0.0.1"; + export typo3DatabaseUsername="root"; + export typo3DatabasePassword="root"; + composer ci:tests:functional strategy: matrix: - typo3-version: - - "^9.5" - #- "^10.4" composer-dependencies: - highest - #- lowest php-version: - 7.2 - 7.3 - 7.4 - - steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - - - name: Cache dependencies installed with composer - uses: actions/cache@v1 - with: - path: ~/.composer/cache - key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer- - - - name: Install TYPO3 Core - env: - TYPO3: ${{ matrix.typo3-version }} - run: | - composer require typo3/minimal:"$TYPO3" - composer show - - - name: Install lowest dependencies with composer - if: matrix.composer-dependencies == 'lowest' - run: | - composer update --no-ansi --no-interaction --no-progress --no-suggest --prefer-lowest - composer show - - - name: Install highest dependencies with composer - if: matrix.composer-dependencies == 'highest' - run: | - composer update --no-ansi --no-interaction --no-progress --no-suggest - composer show - - - name: Start MySQL - run: sudo /etc/init.d/mysql start - - - name: Run functional tests - run: | - export typo3DatabaseName="typo3"; - export typo3DatabaseHost="127.0.0.1"; - export typo3DatabaseUsername="root"; - export typo3DatabasePassword="root"; - composer ci:tests:functional + typo3-version: + - ^9.5 \ No newline at end of file diff --git a/Configuration/TsLint.yml b/Configuration/TsLint.yml index 471605e..23904e1 100644 --- a/Configuration/TsLint.yml +++ b/Configuration/TsLint.yml @@ -1,16 +1,24 @@ +--- sniffs: - - class: Indentation + - + class: Indentation parameters: - useSpaces: true - indentPerLevel: 4 indentConditions: true - - class: DeadCode - - class: OperatorWhitespace - - class: RepeatingRValue + indentPerLevel: 4 + useSpaces: true + - + class: DeadCode + - + class: OperatorWhitespace + - + class: RepeatingRValue disabled: true - - class: DuplicateAssignment - - class: EmptySection + - + class: DuplicateAssignment + - + class: EmptySection disabled: true - - class: NestingConsistency + - + class: NestingConsistency parameters: - commonPathPrefixThreshold: 1 + commonPathPrefixThreshold: 1 \ No newline at end of file diff --git a/codeception.yml b/codeception.yml index 0577a62..5cd9095 100644 --- a/codeception.yml +++ b/codeception.yml @@ -1,41 +1,38 @@ -# suite config +--- suites: - acceptance: - actor: AcceptanceTester - path: . - modules: - enabled: - - WebDriver: - url: https://www.oliverklee.de - browser: chrome - - \Helper\Acceptance - + acceptance: + actor: AcceptanceTester + modules: + enabled: + - + WebDriver: + browser: chrome + url: "https://www.oliverklee.de" + - \Helper\Acceptance + path: "." extensions: - enabled: [Codeception\Extension\RunFailed] - -params: - - env - + enabled: + - Codeception\Extension\RunFailed gherkin: [] - -# additional paths -paths: - tests: Tests/Acceptance - output: .Build/public/typo3temp/var/tests/_output - data: .Build/public/typo3temp/var/tests/_data - support: Tests/Acceptance/_support - envs: .Build/public/typo3temp/var/tests/_envs - -settings: - shuffle: false - lint: true - modules: config: WebDriver: browser: chrome - port: 9515 # ChromeDriver port - window_size: false capabilities: chromeOptions: - args: ["--headless", "--disable-gpu"] + args: + - "--headless" + - "--disable-gpu" + port: 9515 + window_size: false +params: + - env +paths: + data: .Build/public/typo3temp/var/tests/_data + envs: .Build/public/typo3temp/var/tests/_envs + output: .Build/public/typo3temp/var/tests/_output + support: Tests/Acceptance/_support + tests: Tests/Acceptance +settings: + lint: true + shuffle: false