Skip to content

Commit 38fdc07

Browse files
authored
Update workflows (#331)
1 parent 53a9305 commit 38fdc07

6 files changed

Lines changed: 19 additions & 96 deletions

File tree

.github/workflows/bc.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
on:
22
pull_request:
3-
paths:
3+
paths: &paths
44
- 'src/**'
55
- '.github/workflows/bc.yml'
66
- 'composer.json'
77
push:
88
branches: ['master']
9-
paths:
10-
- 'src/**'
11-
- '.github/workflows/bc.yml'
12-
- 'composer.json'
9+
paths: *paths
1310

1411
name: backwards compatibility
1512

@@ -21,7 +18,5 @@ jobs:
2118
roave_bc_check:
2219
uses: yiisoft/actions/.github/workflows/bc.yml@master
2320
with:
24-
os: >-
25-
['ubuntu-latest']
2621
php: >-
2722
['8.5']

.github/workflows/build.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
pull_request:
3-
paths:
3+
paths: &paths
44
- 'bin/**'
55
- 'config/**'
66
- 'resources/**'
@@ -12,15 +12,7 @@ on:
1212

1313
push:
1414
branches: ['master']
15-
paths:
16-
- 'bin/**'
17-
- 'config/**'
18-
- 'resources/**'
19-
- 'src/**'
20-
- 'tests/**'
21-
- '.github/workflows/build.yml'
22-
- 'composer.json'
23-
- 'phpunit.xml.dist'
15+
paths: *paths
2416

2517
name: build
2618

@@ -45,7 +37,7 @@ jobs:
4537

4638
steps:
4739
- name: Checkout.
48-
uses: actions/checkout@v4
40+
uses: actions/checkout@v6
4941

5042
- name: Install PHP with extensions.
5143
uses: shivammathur/setup-php@v2
@@ -57,7 +49,6 @@ jobs:
5749
- name: Install Composer dependencies + required yiisoft/db and yiisoft/db-sqlite
5850
uses: yiisoft/actions/install-packages@master
5951
with:
60-
composer-root-version: 2.0.0
6152
packages: >-
6253
['db', 'db-sqlite']
6354

.github/workflows/composer-require-checker.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
pull_request:
3-
paths:
3+
paths: &paths
44
- 'bin/**'
55
- 'config/**'
66
- 'resources/**'
@@ -11,14 +11,7 @@ on:
1111

1212
push:
1313
branches: ['master']
14-
paths:
15-
- 'bin/**'
16-
- 'config/**'
17-
- 'resources/**'
18-
- 'src/**'
19-
- '.github/workflows/composer-require-checker.yml'
20-
- 'composer.json'
21-
- 'composer-require-checker.json'
14+
paths: *paths
2215

2316
name: Composer require checker
2417

@@ -34,4 +27,3 @@ jobs:
3427
['8.1', '8.2', '8.3', '8.4', '8.5']
3528
required-packages: >-
3629
['db']
37-
composer-root-version: 2.0.0

.github/workflows/mutation.yml

Lines changed: 10 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,26 @@
11
on:
22
pull_request:
3-
paths:
3+
paths: &paths
4+
- 'resources/**'
45
- 'src/**'
6+
- 'tests/**'
57
- '.github/workflows/mutation.yml'
68
- 'composer.json'
79
- 'infection.json.dist'
810

911
push:
1012
branches: ['master']
11-
paths:
12-
- 'src/**'
13-
- '.github/workflows/mutation.yml'
14-
- 'composer.json'
15-
- 'infection.json.dist'
13+
paths: *paths
1614

17-
name: mutation test
15+
name: mutation
16+
17+
permissions:
18+
contents: read
1819

1920
concurrency:
2021
group: ${{ github.workflow }}-${{ github.ref }}
2122
cancel-in-progress: true
2223

2324
jobs:
24-
mutation:
25-
name: PHP ${{ matrix.php }}
26-
27-
env:
28-
extensions: pdo, pdo_pgsql, pdo_sqlite
29-
30-
runs-on: ubuntu-latest
31-
32-
strategy:
33-
matrix:
34-
php:
35-
- 8.5
36-
37-
services:
38-
postgres:
39-
image: postgres:18
40-
env:
41-
POSTGRES_USER: root
42-
POSTGRES_PASSWORD: root
43-
POSTGRES_DB: yiitest
44-
ports:
45-
- 5432:5432
46-
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
47-
48-
steps:
49-
- name: Checkout.
50-
uses: actions/checkout@v4
51-
52-
- name: Install PHP.
53-
uses: shivammathur/setup-php@v2
54-
with:
55-
php-version: ${{ matrix.php }}
56-
extensions: ${{ env.extensions }}
57-
ini-values: date.timezone='UTC'
58-
coverage: pcov
59-
60-
- name: Install Composer dependencies
61-
uses: ramsey/composer-install@v3
62-
63-
- name: Install required yiisoft/db and yiisoft/db-pgsql
64-
uses: yiisoft/actions/install-packages@master
65-
with:
66-
composer-root-version: 2.0.1
67-
packages: >-
68-
['db', 'db-pgsql']
69-
70-
- name: Run infection.
71-
run: |
72-
vendor/bin/infection --threads=2 --ignore-msi-with-no-mutations --test-framework-options="--testsuite=Pgsql"
73-
env:
74-
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
25+
tests:
26+
uses: yiisoft/actions/.github/workflows/db-mutation.yml@master

.github/workflows/rector-cs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ jobs:
2929
php: '8.1'
3030
required-packages: >-
3131
['db']
32-
composer-root-version: 2.0.0

.github/workflows/static.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
pull_request:
3-
paths:
3+
paths: &paths
44
- 'bin/**'
55
- 'src/**'
66
- '.github/workflows/static.yml'
@@ -9,12 +9,7 @@ on:
99

1010
push:
1111
branches: ['master']
12-
paths:
13-
- 'bin/**'
14-
- 'src/**'
15-
- '.github/workflows/static.yml'
16-
- 'psalm*.xml'
17-
- 'composer.json'
12+
paths: *paths
1813

1914
name: Static analysis
2015

@@ -30,4 +25,3 @@ jobs:
3025
['8.1', '8.2', '8.3', '8.4']
3126
required-packages: >-
3227
['db']
33-
composer-root-version: 2.0.0

0 commit comments

Comments
 (0)