Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 33 additions & 41 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,19 @@ jobs:
run: composer install --prefer-dist --no-progress --no-suggest

- name: Coding Guideline
run: vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./
run: composer project:cgl

code-quality:
runs-on: ubuntu-latest
needs:
- php-linting
strategy:
matrix:
include:
- php-version: '8.2'
typo3-version: '^13.4'
- php-version: '8.3'
typo3-version: '^13.4'
- php-version: '8.4'
typo3-version: '^13.4'
- php-version: '8.5'
typo3-version: '^13.4'
php-version:
- 8.2
- 8.3
- 8.4
- 8.5
steps:
- uses: actions/checkout@v4

Expand All @@ -89,58 +85,54 @@ jobs:

- name: Install dependencies with expected TYPO3 version
run: |-
composer require --no-interaction --prefer-dist --no-progress "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-extbase:${{ matrix.typo3-version }}" "typo3/cms-frontend:${{ matrix.typo3-version }}"
composer remove --dev ssch/typo3-rector \
&& composer require typo3/cms-install "*" \
&& composer install --no-progress --no-ansi --no-interaction

- name: Build codeception tester
run: vendor/bin/codecept build
run: .build/bin/codecept build

- name: Code Quality (by PHPStan)
run: vendor/bin/phpstan analyse -c Build/phpstan.neon
run: composer project:phpstan

test-php:
tests-unit-and-functional:
runs-on: ubuntu-latest
needs:
- coding-guideline
- code-quality
strategy:
matrix:
php-version:
- 8.2
- 8.3
- 8.4
- 8.5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v17
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Run Unit Tests PHP8.2
run: nix-shell --arg phpVersion \"php82\" --pure --run project-test-unit

- name: Run Unit Tests PHP8.3
run: nix-shell --arg phpVersion \"php83\" --pure --run project-test-unit

- name: Run Unit Tests PHP8.4
run: nix-shell --arg phpVersion \"php84\" --pure --run project-test-unit

- name: Run Unit Tests PHP8.5
run: nix-shell --arg phpVersion \"php85\" --pure --run project-test-unit

- name: Run Functional Tests PHP8.2
run: nix-shell --arg phpVersion \"php82\" --pure --run project-test-functional
php-version: "${{ matrix.php-version }}"
tools: composer:v2

- name: Run Functional Tests PHP8.3
run: nix-shell --arg phpVersion \"php83\" --pure --run project-test-functional
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run Functional Tests PHP8.4
run: nix-shell --arg phpVersion \"php84\" --pure --run project-test-functional
- name: Run unit tests
run: composer project:test:unit

- name: Run Functional Tests PHP8.5
run: nix-shell --arg phpVersion \"php85\" --pure --run project-test-functional
- name: Run functional tests
run: export typo3DatabaseDriver=pdo_sqlite && composer project:test:functional

test-acceptance:
runs-on: ubuntu-latest
needs:
- test-php
- tests-unit-and-functional
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- uses: cachix/install-nix-action@v17
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable

Expand Down
154 changes: 0 additions & 154 deletions .gitlab-ci.yml

This file was deleted.

5 changes: 5 additions & 0 deletions Build/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
(new PhpCsFixer\Finder())
->ignoreVCSIgnored(true)
->in(__DIR__ . '/../')
->exclude(
[
'var/',
]
)
)
->setRiskyAllowed(true)
->setRules([
Expand Down
1 change: 0 additions & 1 deletion Build/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ parameters:
- ../Classes
- ../Configuration
- ../Tests
- ../ext_emconf.php
- ../ext_localconf.php
excludePaths:
- ../Tests/Acceptance/Support/_generated
18 changes: 17 additions & 1 deletion Build/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" bootstrap="../vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php" colors="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" requireCoverageMetadata="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
backupGlobals="true"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="../.build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
cacheResult="false"
colors="true"
failOnDeprecation="true"
failOnWarning="true"
failOnRisky="true"
processIsolation="false"
requireCoverageMetadata="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
>
<coverage/>
<testsuites>
<testsuite name="functional">
Expand Down
22 changes: 22 additions & 0 deletions Classes/Constants.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

namespace Extcode\CartProducts;

/*
* This file is part of the package extcode/cart-products
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/

class Constants
{
/**
* Named constants for "magic numbers" of the field doktype.
*/
public const DOKTYPE_CARTPRODUCTS_PRODUCTS = 182;
public const DOKTYPE_CARTPRODUCTS_PRODUCT = 183;

}
Loading
Loading