-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (104 loc) · 4.34 KB
/
acceptance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: acceptance tests
on:
workflow_dispatch:
jobs:
acceptance-tests:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
env:
- { php: 7.3, TYPO3_VERSION: ^9.5, TESTING_FRAMEWORK: ^4.15.5 }
- { php: 7.4, TYPO3_VERSION: ^9.5, TESTING_FRAMEWORK: ^4.15.5 }
- { php: 7.3, TYPO3_VERSION: ^10.4, TESTING_FRAMEWORK: ^6.16.2, SECURITY_ADVISORIES: 1 }
- { php: 7.4, TYPO3_VERSION: ^10.4, TESTING_FRAMEWORK: ^6.16.2, SECURITY_ADVISORIES: 1 }
- { php: 7.4, TYPO3_VERSION: ^11.5, TESTING_FRAMEWORK: ^6.16.2, SECURITY_ADVISORIES: 1 }
- { php: 8.0, TYPO3_VERSION: ^11.5, TESTING_FRAMEWORK: ^6.16.2, SECURITY_ADVISORIES: 1 }
- { php: 8.1, TYPO3_VERSION: ^11.5, TESTING_FRAMEWORK: ^6.16.2, SECURITY_ADVISORIES: 1 }
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up PHP version ${{ matrix.env.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.env.php }}
tools: composer:v2, php-cs-fixer
extension: pdo, sqlite3
# composer
- name: Update Composer
run: |
sudo composer self-update
composer --version
php --version
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache dependencies
uses: actions/[email protected]
with:
path: ~/.composer/cache
key: dependencies-composer-${{ hashFiles('composer.json') }}
- name: Ensure stability dev
if: ${{ matrix.env.TYPO3_VERSION == 'dev-main' }}
run: |
composer config minimum-stability dev
composer config prefer-stable true
- name: Install TYPO3 core
env:
TYPO3_VERSION: ${{ matrix.env.TYPO3_VERSION }}
TESTING_FRAMEWORK: ${{ matrix.env.TESTING_FRAMEWORK }}
run: |
composer require --dev typo3/testing-framework="${TESTING_FRAMEWORK}" typo3/cms-core="${TYPO3_VERSION}"
- name: Finalize TYPO3 core
env:
TYPO3_VERSION: ${{ matrix.env.TYPO3_VERSION }}
SECURITY_ADVISORIES: ${{ matrix.env.SECURITY_ADVISORIES }}
run: |
[ -n "${SECURITY_ADVISORIES}" ] && composer require --dev roave/security-advisories || exit 0
- name: Start database server
run: sudo /etc/init.d/mysql start
- 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/_envs/github-actions.yml
php -S 0.0.0.0:8888 -t .Build/public/ &> php.log.txt &
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
java -Djava.awt.headless=true -jar $SELENIUM_JAR_PATH standalone &
sleep 3;
- name: Acceptance Tests
env:
CODECEPTION_ENV: github-actions
TYPO3_VERSION: ${{ matrix.env.TYPO3_VERSION }}
IS_T3ACCEPTANCE_RUN: true
TYPO3_CONTEXT: Development
typo3DatabaseHost: 127.0.0.1
typo3DatabasePassword: root
typo3DatabaseUsername: root
typo3DatabaseName: t3acceptance
run: |
cp -R Tests/Acceptance/_data/typo3conf .Build/public/
cp -R Tests/Acceptance/_data/config .Build/
[ "${TYPO3_VERSION}" != "^11.5" ] && .Build/bin/typo3cms install:generatepackagestates || \
echo "TYPO3_VERSION ${TYPO3_VERSION} does not need install:generatepackagestates anymore"
.Build/bin/codecept run acceptance --env=${CODECEPTION_ENV} -d -c Tests/Build/AcceptanceTests.yml --html
# Save acceptance reports
- name: Upload Codeception output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: codeception-results-${{ matrix.env.php }}-${{ matrix.env.TYPO3_VERSION }}
path: .Build/var/acceptance
- name: Upload PHP log
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: Logfiles-${{ matrix.env.php }}-${{ matrix.env.TYPO3_VERSION }}
path: |
php.log.txt
.Build/var/log