mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-26 12:56:13 +01:00

[TASK] Upgrade the functional tests on CI to Ubuntu 22.04 (#573)

Fixes #173
This commit is contained in:
Oliver Klee 2022-09-21 16:54:21 +02:00 committed by GitHub
parent 03448bb8d2
commit e135cc244a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 15 deletions

View file

@ -182,8 +182,13 @@ jobs:
composer-dependencies: lowest composer-dependencies: lowest
functional-tests: functional-tests:
name: "Functional tests" name: "Functional tests"
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
needs: php-lint needs: php-lint
env:
DB_DATABASE: typo3
DB_USER: root
DB_PASSWORD: root
DB_HOST: localhost
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -222,12 +227,15 @@ jobs:
composer show composer show
- name: "Start MySQL" - name: "Start MySQL"
run: "sudo /etc/init.d/mysql start" run: "sudo /etc/init.d/mysql start"
# This workaround for MySQL 8 can be removed once we drop support for PHP 7.2/7.3.
- name: "Configure the MySQL user to work with PHP 7.2/7.3"
run: mysql -u root --password=root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'"
- name: "Run functional tests" - name: "Run functional tests"
run: | run: |
export typo3DatabaseName="typo3"; export typo3DatabaseName="$DB_DATABASE";
export typo3DatabaseHost="127.0.0.1"; export typo3DatabaseHost="$DB_HOST";
export typo3DatabaseUsername="root"; export typo3DatabaseUsername="$DB_USER";
export typo3DatabasePassword="root"; export typo3DatabasePassword="$DB_PASSWORD";
composer ci:tests:functional composer ci:tests:functional
strategy: strategy:
fail-fast: false fail-fast: false

View file

@ -9,7 +9,12 @@ on:
jobs: jobs:
code-coverage: code-coverage:
name: "Calculate code coverage" name: "Calculate code coverage"
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
env:
DB_DATABASE: typo3
DB_USER: root
DB_PASSWORD: root
DB_HOST: localhost
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -46,14 +51,17 @@ jobs:
composer show composer show
- name: "Start MySQL" - name: "Start MySQL"
run: "sudo /etc/init.d/mysql start" run: "sudo /etc/init.d/mysql start"
# This workaround for MySQL 8 can be removed once we drop support for PHP 7.2/7.3.
- name: "Configure the MySQL user to work with PHP 7.2/7.3"
run: mysql -u root --password=root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'"
- name: "Run unit tests with coverage" - name: "Run unit tests with coverage"
run: composer ci:coverage:unit run: composer ci:coverage:unit
- name: "Run functional tests with coverage" - name: "Run functional tests with coverage"
run: | run: |
export typo3DatabaseName="typo3"; export typo3DatabaseName="$DB_DATABASE";
export typo3DatabaseHost="127.0.0.1"; export typo3DatabaseHost="$DB_HOST";
export typo3DatabaseUsername="root"; export typo3DatabaseUsername="$DB_USER";
export typo3DatabasePassword="root"; export typo3DatabasePassword="$DB_PASSWORD";
composer ci:coverage:functional composer ci:coverage:functional
- name: "Merge coverage results" - name: "Merge coverage results"
run: composer ci:coverage:merge run: composer ci:coverage:merge

View file

@ -202,8 +202,13 @@ jobs:
- "^10.4" - "^10.4"
functional-tests: functional-tests:
name: "Functional tests" name: "Functional tests"
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
needs: php-lint needs: php-lint
env:
DB_DATABASE: typo3
DB_USER: root
DB_PASSWORD: root
DB_HOST: localhost
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -240,12 +245,15 @@ jobs:
composer show composer show
- name: "Start MySQL" - name: "Start MySQL"
run: "sudo /etc/init.d/mysql start" run: "sudo /etc/init.d/mysql start"
# This workaround for MySQL 8 can be removed once we drop support for PHP 7.2/7.3.
- name: "Configure the MySQL user to work with PHP 7.2/7.3"
run: mysql -u root --password=root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'"
- name: "Run functional tests" - name: "Run functional tests"
run: | run: |
export typo3DatabaseName="typo3"; export typo3DatabaseName="$DB_DATABASE";
export typo3DatabaseHost="127.0.0.1"; export typo3DatabaseHost="$DB_HOST";
export typo3DatabaseUsername="root"; export typo3DatabaseUsername="$DB_USER";
export typo3DatabasePassword="root"; export typo3DatabasePassword="$DB_PASSWORD";
composer ci:tests:functional composer ci:tests:functional
strategy: strategy:
fail-fast: false fail-fast: false