-
Notifications
You must be signed in to change notification settings - Fork 3
84 lines (74 loc) · 2.46 KB
/
tests.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
name: Tests
on:
push:
branches:
- master
- 'renovate/**'
pull_request:
branches:
- master
jobs:
tests:
name: Tests (PHP ${{ matrix.php-version }}, TYPO3 ${{ matrix.typo3-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
typo3-version: [ "13.4.1" ]
php-version: [ "8.2", "8.3", "8.4" ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Prepare environment
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
php-version: ${{ matrix.php-version }}
coverage: none
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
# Setup DDEV
- name: Setup DDEV
uses: ddev/github-action-setup-ddev@v1
with:
autostart: false
- name: Configure and start DDEV
run: |
ddev config --project-type=typo3 --php-version=${{ matrix.php-version }} --xdebug-enabled=true --web-environment-add="XDEBUG_MODE=coverage"
ddev start
# Install dependencies
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: --with=typo3/cms-core:"^${{ matrix.typo3-version }}"
# Init TYPO3
- name: Init TYPO3
run: ddev init-typo3
# Run tests
- name: Run acceptance tests
uses: nick-fields/retry@v3
with:
max_attempts: 3
retry_on: error
timeout_minutes: 10
command: ddev composer ci:test:acceptance
new_command_on_retry: ddev composer test:acceptance -- -g failed
- name: Run functional and unit tests
run: |
ddev composer ci:test:functional
ddev composer ci:test:unit
# Save acceptance reports
- uses: actions/upload-artifact@v4
with:
name: acceptance-reports-${{ matrix.php-version }}-${{ matrix.typo3-version }}
path: Tests/Acceptance/_output
if: failure()
# Report coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/clover-unit.xml,./coverage/clover-functional.xml,./Tests/Acceptance/_output/Xima.XmFormcycle.Tests.Acceptance.Acceptance.remote.coverage.xml