Skip to content

Commit 74f8d17

Browse files
committed
updated CI workflow
1 parent 97bbe54 commit 74f8d17

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@ on:
44
pull_request:
55
branches:
66
- "*.x"
7+
paths:
8+
- ".github/workflows/continuous-integration.yml"
9+
- "composer.*"
10+
- "src/**"
11+
- "phpunit.xml.dist"
12+
- "tests/**"
713
push:
814
branches:
915
- "*.x"
16+
paths:
17+
- ".github/workflows/continuous-integration.yml"
18+
- "composer.*"
19+
- "src/**"
20+
- "phpunit.xml.dist"
21+
- "tests/**"
1022

1123
jobs:
1224
phpunit:
@@ -60,26 +72,31 @@ jobs:
6072

6173
steps:
6274
- name: "Checkout"
63-
uses: "actions/checkout@v2"
75+
uses: "actions/checkout@v4"
6476
with:
6577
fetch-depth: 2
6678

67-
- name: "Install PHP"
79+
- name: "Install PHP with PCOV"
6880
uses: "shivammathur/setup-php@v2"
6981
with:
7082
php-version: "${{ matrix.php-version }}"
7183
coverage: "pcov"
72-
ini-values: "error_reporting=E_ALL, zend.assertions=1"
84+
ini-values: "zend.assertions=1"
7385
extensions: "pdo_mysql"
7486

87+
- name: "Set COMPOSER_ROOT_VERSION"
88+
run: |
89+
echo "COMPOSER_ROOT_VERSION=${{ inputs.composer-root-version }}" >> $GITHUB_ENV
90+
if: "${{ inputs.composer-root-version }}"
91+
7592
- name: "Require specific DBAL version"
7693
run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update"
7794

7895
- name: "Install dependencies with Composer"
79-
uses: "ramsey/composer-install@v1"
96+
uses: "ramsey/composer-install@v3"
8097
with:
8198
dependency-versions: "${{ matrix.dependencies }}"
82-
composer-options: "--prefer-dist --no-suggest"
99+
composer-options: "${{ inputs.composer-options }}"
83100

84101
- name: "Remove optional dependencies"
85102
if: "! matrix.optional-dependencies"
@@ -102,29 +119,31 @@ jobs:
102119
run: "./ci/run-cli-migrations.sh"
103120

104121
- name: "Upload coverage file"
105-
uses: "actions/upload-artifact@v2"
122+
uses: "actions/upload-artifact@v4"
106123
with:
107-
name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ matrix.dbal-version }}.coverage"
124+
name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ matrix.optional-dependencies }}-${{ matrix.dbal-version }}.coverage"
108125
path: "coverage.xml"
109126

110127
upload_coverage:
111128
name: "Upload coverage to Codecov"
112-
runs-on: "ubuntu-20.04"
129+
runs-on: "ubuntu-22.04"
113130
needs:
114131
- "phpunit"
115132

116133
steps:
117134
- name: "Checkout"
118-
uses: "actions/checkout@v2"
135+
uses: "actions/checkout@v4"
119136
with:
120137
fetch-depth: 2
121138

122139
- name: "Download coverage files"
123-
uses: "actions/download-artifact@v4.1.7"
140+
uses: "actions/download-artifact@v4"
124141
with:
125142
path: "reports"
126143

127144
- name: "Upload to Codecov"
128-
uses: "codecov/codecov-action@v1"
145+
uses: "codecov/codecov-action@v5"
129146
with:
130147
directory: "reports"
148+
env:
149+
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"

0 commit comments

Comments
 (0)