Skip to content

[FEATURE] Make extension setting for added time #70

[FEATURE] Make extension setting for added time

[FEATURE] Make extension setting for added time #70

Workflow file for this run

name: Acceptance Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up PHP Version
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
- name: Start MySQL
run: sudo /etc/init.d/mysql start
# Directory permissions for .composer are wrong, so we remove the complete directory
# https://github.com/actions/virtual-environments/issues/824
- name: Delete .composer directory
run: |
sudo rm -rf ~/.composer
- name: Validate composer.json and composer.lock
run: |
cd .Build
composer validate
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: dependencies-composer-${{ hashFiles('composer.json') }}
- name: Install composer dependencies
run: |
cd .Build
composer install --no-progress
- name: Initialize TYPO3 environment
run: |
cp -R Tests/Acceptance/Fixtures/fileadmin .Build/public/
cp -R Tests/Acceptance/Fixtures/config .Build
cd .Build
echo "Run 'composer install' to activate extension"
composer install --no-progress
- name: Run PHP webserver
run: |
export APP_IP=`ip addr show eth0 | grep -Po 'inet \K[\d.]+'`
sed -i -e "s/LOCAL_DOMAIN/$APP_IP:8888/" Tests/Acceptance/WithChromeBrowser/_envs/github-actions.yml
sed -i -e "s/LOCAL_DOMAIN/$APP_IP:8888/" Tests/Acceptance/WithPhpBrowser/_envs/github-actions.yml
php -S 0.0.0.0:8888 -t .Build/public/ &> php.log &
sleep 2;
- name: Test PHP webserver and initialize TYPO3 cache
run: |
export APP_IP=`ip addr show eth0 | grep -Po 'inet \K[\d.]+'`
curl "$APP_IP:8888"
- name: Start Selenium standalone
run: |
echo $SELENIUM_JAR_PATH
xvfb-run --server-args="-screen 0, 1280x720x24" --auto-servernum java -jar $SELENIUM_JAR_PATH standalone --log selenium-server.log &
- name: Wait for browser & PHP to start
timeout-minutes: 1
run: |
while ! nc -z 127.0.0.1 4444 </dev/null; do echo Waiting for remote driver to start...; sleep 1; done
while ! nc -z 127.0.0.1 8888 </dev/null; do echo Waiting for PHP server to start...; sleep 1; done
- name: Codeception Acceptance Tests with phpbrowser (no JavaScript)
run: .Build/vendor/bin/codecept run acceptance --env=github-actions -c .Build/Acceptance/AcceptanceTestsPhpBrowser.yml --html
- name: Codeception Acceptance Tests with chrome (JavaScript enabled)
run: .Build/vendor/bin/codecept run acceptance --env=github-actions -c .Build/Acceptance/AcceptanceTestsChrome.yml --html
- name: Upload Codeception output
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: codeception-results
path: Tests/Acceptance/_output/
- name: Upload logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: typo3-log
path: |
.Build/var/log/
php.log
selenium-server.log