Skip to content

Commit

Permalink
Merge pull request #17 from dikastes/12-thoroughly-test-setting-and-g…
Browse files Browse the repository at this point in the history
…etting-mpdb-ids

12 thoroughly test setting and getting mpdb ids
  • Loading branch information
dikastes authored Apr 16, 2024
2 parents 11f1dbe + daac41e commit 8afacc1
Show file tree
Hide file tree
Showing 16 changed files with 1,828 additions and 240 deletions.
87 changes: 4 additions & 83 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,110 +9,31 @@ jobs:
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2.6
- name: "Show Composer version"
run: composer --version
- name: "Show the Composer configuration"
run: composer config --global --list
- name: "Cache dependencies installed with composer"
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies"
run: "composer update --no-progress"
run: "composer ci:install"
- name: "Run command"
run: "composer ci:${{ matrix.command }}"
strategy:
fail-fast: false
matrix:
command:
- php:stan
php-version:
- '8.2'
- '8.3'
run: "composer ci:php:stan"

unit-tests:
name: Unit Tests
runs-on: ubuntu-22.04
needs: [ code-quality ]
strategy:
matrix:
php-version:
- '8.2'
- '8.3'
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2.6
- name: "Show Composer version"
run: composer --version
- name: "Show the Composer configuration"
run: composer config --global --list
- name: "Cache dependencies installed with composer"
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies"
run: "composer update --no-progress"
run: "composer ci:install"
- name: "Run the tests"
run: "composer ci:tests:unit"

functional-tests:
name: Functional Tests
runs-on: ubuntu-22.04
needs: [ code-quality ]
strategy:
matrix:
php-version:
- '8.2'
- '8.3'
env:
DB_DATABASE: typo3
DB_USER: root
DB_PASSWORD: root
DB_HOST: 127.0.0.1

steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2.6
- name: "Show Composer version"
run: composer --version
- name: "Show the Composer configuration"
run: composer config --global --list
- name: "Cache dependencies installed with composer"
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies"
run: "composer update --no-progress"
- name: "Start MySQL"
run: "sudo /etc/init.d/mysql start"
- name: "Run the tests"
run: |
export typo3DatabaseName="$DB_DATABASE";
export typo3DatabaseHost="$DB_HOST";
export typo3DatabaseUsername="$DB_USER";
export typo3DatabasePassword="$DB_PASSWORD";
composer ci:tests:functional
run: "composer ci:tests:functional"
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.idea/
.Build/
.idea/
.cache/
Build/testing-docker/.env
composer.lock
bin/
public/
typo3temp/
vendor/
composer.lock
Loading

0 comments on commit 8afacc1

Please sign in to comment.