-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 2.36 KB
/
_test.yaml
File metadata and controls
68 lines (57 loc) · 2.36 KB
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
name: Test
on:
workflow_call:
concurrency:
group: ${{ github.ref }}-test
cancel-in-progress: true
jobs:
phpunit:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8-oracle
env:
MYSQL_DATABASE: shopware
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
composer-command:
- install
- require shopware/core:~6.7.7.0
- require shopware/core:~6.7.6.0
- require shopware/core:~6.7.5.0 --no-security-blocking
- require shopware/core:~6.7.4.0 --no-security-blocking
- require shopware/core:~6.7.3.0 --no-security-blocking
# - require shopware/core:~6.7.2.0 --no-security-blocking - needs admin for testing, see https://github.com/shopware/shopware/pull/12604
- require shopware/core:~6.7.1.0 --no-security-blocking
- require shopware/core:~6.7.0.0 --no-security-blocking
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/composer
with:
composer-install: false
additional-extensions: ',pcov'
- run: composer ${{ matrix.composer-command }}
- run: cp .env.ci .env.test.local
- name: Run tests
run: composer run phpunit-report
- name: Upload test results
if: ${{ matrix.composer-command == 'install' }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./public/tests
retention-days: 1
- name: Monitor test coverage
uses: slavcodev/coverage-monitor-action@v1
if: ${{ matrix.composer-command == 'install' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
coverage_path: 'reports/coverage.clover.xml'
threshold_alert: 95
threshold_warning: 99
threshold_metric: 'lines'