Skip to content

Commit 9f95d51

Browse files
committed
Cleanup GitHub workflows
1 parent 63814c1 commit 9f95d51

11 files changed

Lines changed: 100 additions & 117 deletions

File tree

.github/workflows/bc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: backwards compatibility
2+
13
on:
24
pull_request:
35
paths-ignore:
@@ -20,8 +22,6 @@ on:
2022
- 'infection.json.dist'
2123
- 'psalm.xml'
2224

23-
name: backwards compatibility
24-
2525
permissions:
2626
contents: read
2727

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Composer require checker
2+
13
on:
24
pull_request:
35
paths-ignore:
@@ -22,8 +24,6 @@ on:
2224
- 'phpunit.xml.dist'
2325
- 'psalm.xml'
2426

25-
name: Composer require checker
26-
2727
permissions:
2828
contents: read
2929

.github/workflows/mariadb.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: mariadb
2+
13
on:
24
pull_request:
35
paths-ignore:
@@ -20,8 +22,6 @@ on:
2022
- 'infection.json.dist'
2123
- 'psalm.xml'
2224

23-
name: mariadb
24-
2525
permissions:
2626
contents: read
2727

@@ -80,35 +80,33 @@ jobs:
8080
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=3
8181

8282
steps:
83-
- name: Checkout.
84-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
83+
- name: Checkout
84+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
8585
with:
8686
persist-credentials: false
8787

88-
- name: Install PHP with extensions.
89-
uses: shivammathur/setup-php@b604ade2a87db23f8871b7182e69ec5e75effb45
88+
- name: Install PHP with extensions
89+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
9090
with:
9191
php-version: ${{ matrix.php }}
9292
extensions: ${{ env.extensions }}
9393
ini-values: date.timezone='UTC'
9494
coverage: pcov
9595

96-
- name: Update composer.
97-
run: composer self-update
98-
99-
- uses: "ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f"
96+
- name: Install Composer dependencies
97+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
10098
with:
10199
composer-options: "--prefer-dist --no-interaction --no-progress --ansi"
102100

103-
- name: Install db-mysql.
101+
- name: Install db-mysql
104102
run: composer require yiisoft/db-mysql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
105103

106-
- name: Run tests with phpunit.
104+
- name: Run tests with phpunit
107105
run: vendor/bin/phpunit --testsuite=Mysql --coverage-clover=coverage.xml --colors=always
108106

109-
- name: Upload coverage to Codecov.
107+
- name: Upload coverage to Codecov
110108
if: matrix.php == '8.5'
111-
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457
109+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
112110
with:
113111
token: ${{ secrets.CODECOV_TOKEN }}
114112
files: ./coverage.xml

.github/workflows/mssql.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: mssql
2+
13
on:
24
pull_request:
35
paths-ignore:
@@ -20,8 +22,6 @@ on:
2022
- 'infection.json.dist'
2123
- 'psalm.xml'
2224

23-
name: mssql
24-
2525
permissions:
2626
contents: read
2727

@@ -82,44 +82,42 @@ jobs:
8282
options: --name=mssql --health-cmd="/opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
8383

8484
steps:
85-
- name: Checkout.
86-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
85+
- name: Checkout
86+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
8787
with:
8888
persist-credentials: false
8989

90-
- name: Install ODBC driver.
90+
- name: Install ODBC driver
9191
run: |
9292
sudo curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
9393
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
9494
9595
- name: Create MS SQL Database.
9696
run: docker exec -i mssql /opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
9797

98-
- name: Install PHP with extensions.
99-
uses: shivammathur/setup-php@b604ade2a87db23f8871b7182e69ec5e75effb45
98+
- name: Install PHP with extensions
99+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
100100
with:
101101
php-version: ${{ matrix.php }}
102102
extensions: ${{ env.extensions }}
103103
ini-values: date.timezone='UTC'
104104
coverage: pcov
105105
tools: composer:v2, pecl
106106

107-
- name: Update composer.
108-
run: composer self-update
109-
110-
- uses: "ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f"
107+
- name: Install Composer dependencies
108+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
111109
with:
112110
composer-options: "--prefer-dist --no-interaction --no-progress --ansi"
113111

114-
- name: Install db-mssql.
112+
- name: Install db-mssql
115113
run: composer require yiisoft/db-mssql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
116114

117-
- name: Run tests with phpunit.
115+
- name: Run tests with phpunit
118116
run: vendor/bin/phpunit --testsuite=Mssql --coverage-clover=coverage.xml --colors=always
119117

120-
- name: Upload coverage to Codecov.
118+
- name: Upload coverage to Codecov
121119
if: matrix.php == '8.4'
122-
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457
120+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
123121
with:
124122
token: ${{ secrets.CODECOV_TOKEN }}
125123
files: ./coverage.xml

.github/workflows/mutation.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: mutation test
2+
13
on:
24
pull_request:
35
paths-ignore:
@@ -18,8 +20,6 @@ on:
1820
- '.gitattributes'
1921
- 'psalm.xml'
2022

21-
name: mutation test
22-
2323
permissions:
2424
contents: read
2525

@@ -56,31 +56,29 @@ jobs:
5656
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
5757

5858
steps:
59-
- name: Checkout.
60-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
59+
- name: Checkout
60+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6161
with:
6262
persist-credentials: false
6363

64-
- name: Install PHP with extensions.
65-
uses: shivammathur/setup-php@b604ade2a87db23f8871b7182e69ec5e75effb45
64+
- name: Install PHP with extensions
65+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
6666
with:
6767
php-version: "${{ matrix.php }}"
6868
extensions: ${{ env.extensions }}
6969
ini-values: memory_limit=-1
7070
coverage: pcov
7171
tools: composer:v2
7272

73-
- name: Update composer.
74-
run: composer self-update
75-
76-
- uses: "ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f"
73+
- name: Install Composer dependencies
74+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
7775
with:
7876
composer-options: "--prefer-dist --no-interaction --no-progress --ansi"
7977

80-
- name: Install db-pgsql.
78+
- name: Install db-pgsql
8179
run: composer require yiisoft/db-pgsql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
8280

83-
- name: Run infection.
81+
- name: Run infection
8482
run: |
8583
vendor/bin/roave-infection-static-analysis-plugin --threads=2 --ignore-msi-with-no-mutations --test-framework-options="--testsuite=Pgsql"
8684
env:

.github/workflows/mysql.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: mysql
2+
13
on:
24
pull_request:
35
paths-ignore:
@@ -20,8 +22,6 @@ on:
2022
- 'infection.json.dist'
2123
- 'psalm.xml'
2224

23-
name: mysql
24-
2525
permissions:
2626
contents: read
2727

@@ -72,35 +72,33 @@ jobs:
7272
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
7373

7474
steps:
75-
- name: Checkout.
76-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
75+
- name: Checkout
76+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7777
with:
7878
persist-credentials: false
7979

80-
- name: Install PHP with extensions.
81-
uses: shivammathur/setup-php@b604ade2a87db23f8871b7182e69ec5e75effb45
80+
- name: Install PHP with extensions
81+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
8282
with:
8383
php-version: ${{ matrix.php }}
8484
extensions: ${{ env.extensions }}
8585
ini-values: date.timezone='UTC'
8686
coverage: pcov
8787

88-
- name: Update composer.
89-
run: composer self-update
90-
91-
- uses: "ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f"
88+
- name: Install Composer dependencies
89+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
9290
with:
9391
composer-options: "--prefer-dist --no-interaction --no-progress --ansi"
9492

95-
- name: Install db-mysql.
93+
- name: Install db-mysql
9694
run: composer require yiisoft/db-mysql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
9795

98-
- name: Run tests with phpunit.
96+
- name: Run tests with phpunit
9997
run: vendor/bin/phpunit --testsuite=Mysql --coverage-clover=coverage.xml --colors=always
10098

101-
- name: Upload coverage to Codecov.
99+
- name: Upload coverage to Codecov
102100
if: matrix.php == '8.4'
103-
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457
101+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
104102
with:
105103
token: ${{ secrets.CODECOV_TOKEN }}
106104
files: ./coverage.xml

.github/workflows/oracle.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: oracle
2+
13
on:
24
pull_request:
35
paths-ignore:
@@ -20,8 +22,6 @@ on:
2022
- 'infection.json.dist'
2123
- 'psalm.xml'
2224

23-
name: oracle
24-
2525
permissions:
2626
contents: read
2727

@@ -74,36 +74,34 @@ jobs:
7474
--health-retries 10
7575
7676
steps:
77-
- name: Checkout.
78-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
77+
- name: Checkout
78+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7979
with:
8080
persist-credentials: false
8181

82-
- name: Install PHP with extensions.
83-
uses: shivammathur/setup-php@b604ade2a87db23f8871b7182e69ec5e75effb45
82+
- name: Install PHP with extensions
83+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
8484
with:
8585
php-version: ${{ matrix.php }}
8686
extensions: ${{ env.extensions }}
8787
ini-values: date.timezone='UTC'
8888
coverage: pcov
8989
tools: composer:v2
9090

91-
- name: Update composer.
92-
run: composer self-update
93-
94-
- uses: "ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f"
91+
- name: Install Composer dependencies
92+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
9593
with:
9694
composer-options: "--prefer-dist --no-interaction --no-progress --ansi"
9795

98-
- name: Install db-oracle.
96+
- name: Install db-oracle
9997
run: composer require yiisoft/db-oracle --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
10098

101-
- name: Run tests with phpunit.
99+
- name: Run tests with phpunit
102100
run: vendor/bin/phpunit --testsuite=Oracle --coverage-clover=coverage.xml --colors=always
103101

104102
- name: Upload coverage to Codecov.
105103
if: matrix.php == '8.4'
106-
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457
104+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
107105
with:
108106
token: ${{ secrets.CODECOV_TOKEN }}
109107
files: ./coverage.xml

.github/workflows/pgsql.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: pgsql
2+
13
on:
24
pull_request:
35
paths-ignore:
@@ -20,8 +22,6 @@ on:
2022
- 'infection.json.dist'
2123
- 'psalm.xml'
2224

23-
name: pgsql
24-
2525
permissions:
2626
contents: read
2727

@@ -79,36 +79,34 @@ jobs:
7979
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
8080

8181
steps:
82-
- name: Checkout.
83-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
82+
- name: Checkout
83+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
8484
with:
8585
persist-credentials: false
8686

87-
- name: Install PHP with extensions.
88-
uses: shivammathur/setup-php@b604ade2a87db23f8871b7182e69ec5e75effb45
87+
- name: Install PHP with extensions
88+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
8989
with:
9090
php-version: ${{ matrix.php }}
9191
extensions: ${{ env.extensions }}
9292
ini-values: date.timezone='UTC'
9393
coverage: pcov
9494
tools: composer:v2
9595

96-
- name: Update composer.
97-
run: composer self-update
98-
99-
- uses: "ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f"
96+
- name: Install Composer dependencies
97+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
10098
with:
10199
composer-options: "--prefer-dist --no-interaction --no-progress --ansi"
102100

103-
- name: Install db-pgsql.
101+
- name: Install db-pgsql
104102
run: composer require yiisoft/db-pgsql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
105103

106-
- name: Run tests with phpunit.
104+
- name: Run tests with phpunit
107105
run: vendor/bin/phpunit --testsuite=Pgsql --coverage-clover=coverage.xml --colors=always
108106

109107
- name: Upload coverage to Codecov.
110108
if: matrix.php == '8.5'
111-
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457
109+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
112110
with:
113111
token: ${{ secrets.CODECOV_TOKEN }}
114112
files: ./coverage.xml

0 commit comments

Comments
 (0)