-
Notifications
You must be signed in to change notification settings - Fork 1
110 lines (93 loc) · 3.74 KB
/
Copy pathtests.yml
File metadata and controls
110 lines (93 loc) · 3.74 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
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
name: Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
unit:
if: ${{ !startsWith(github.event.head_commit.message, '[DOC]') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
php-version: [ '8.2', '8.3', '8.4', '8.5' ]
laravel-version: [ '11.*', '12.*', '13.*' ]
exclude:
- php-version: '8.2'
laravel-version: '12.*'
- php-version: '8.2'
laravel-version: '13.*'
- php-version: '8.3'
laravel-version: '13.*'
name: Unit — PHP ${{ matrix.php-version }} / Laravel ${{ matrix.laravel-version }} (${{ matrix.os }})
steps:
- uses: actions/checkout@v6
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: openssl, sockets
coverage: none
- name: Install Composer dependencies
run: |
composer require "illuminate/support:${{ matrix.laravel-version }}" "illuminate/console:${{ matrix.laravel-version }}" "illuminate/contracts:${{ matrix.laravel-version }}" --no-interaction --no-update
composer install --no-interaction --prefer-dist
- name: Run unit tests
run: vendor/bin/pest tests/Unit/
integration:
if: ${{ !startsWith(github.event.head_commit.message, '[DOC]') }}
runs-on: ubuntu-latest
needs: unit
strategy:
fail-fast: false
matrix:
php-version: [ '8.2', '8.3', '8.4', '8.5' ]
laravel-version: [ '11.*', '12.*', '13.*' ]
exclude:
- php-version: '8.2'
laravel-version: '12.*'
- php-version: '8.2'
laravel-version: '13.*'
- php-version: '8.3'
laravel-version: '13.*'
name: Integration — PHP ${{ matrix.php-version }} / Laravel ${{ matrix.laravel-version }}
steps:
- uses: actions/checkout@v6
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: openssl, sockets, pcntl
coverage: ${{ matrix.php-version == '8.5' && matrix.laravel-version == '13.*' && 'xdebug' || 'none' }}
- name: Install Composer dependencies
run: |
composer require "illuminate/support:${{ matrix.laravel-version }}" "illuminate/console:${{ matrix.laravel-version }}" "illuminate/contracts:${{ matrix.laravel-version }}" --no-interaction --no-update
composer install --no-interaction --prefer-dist
- name: Start OPC UA test servers
id: opcua
uses: php-opcua/uanetstandard-test-suite@v1.1.0
- name: Run tests
env:
OPCUA_CERTS_DIR: ${{ steps.opcua.outputs.certs-dir }}
run: vendor/bin/pest --log-junit=results/junit.xml ${{ matrix.php-version == '8.5' && matrix.laravel-version == '13.*' && '--coverage-clover=coverage/clover.xml' || '' }}
- name: Upload coverage to Codecov
if: matrix.php-version == '8.5' && matrix.laravel-version == '13.*'
uses: codecov/codecov-action@v6
with:
files: coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v6
with:
files: results/junit.xml
token: ${{ secrets.CODECOV_TOKEN }}
flags: test-results
disable_search: true
- name: Server logs (on failure)
if: failure()
working-directory: .uanetstandard-test-suite
run: docker compose logs --tail=100