-
-
Notifications
You must be signed in to change notification settings - Fork 32
83 lines (69 loc) · 2.11 KB
/
Copy pathbuild.yml
File metadata and controls
83 lines (69 loc) · 2.11 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
name: build
on:
pull_request:
paths: &paths
- 'public/**'
- 'src/**'
- 'config/**'
- 'tests/**'
- 'codeception.yml'
- 'composer.json'
- 'yii'
- 'yii.bat'
- '.github/workflows/build.yml'
push:
branches: ['master']
paths: *paths
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
codeception:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
env:
key: cache-v1
APP_C3: true
APP_ENV: test
APP_DEBUG: false
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
steps:
- name: Checkout.
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install PHP with extensions.
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
coverage: false
extensions: fileinfo, intl
ini-values: date.timezone='UTC', register_argc_argv=On
php-version: ${{ matrix.php }}
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Run codeception build.
run: vendor/bin/codecept build
- name: Run tests with codeception with code coverage with shell bash.
if: matrix.os == 'ubuntu-latest'
run: vendor/bin/codecept run --coverage --coverage-xml --disable-coverage-php
- name: Run tests with codeception with code coverage with shell powershell.
if: matrix.os == 'windows-latest'
run: vendor/bin/codecept run
shell: powershell
- name: Upload coverage to Codecov.
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: runtime/tests/_output/coverage.xml