Skip to content

Commit 9a572ca

Browse files
authored
Merge pull request #1138 from szepeviktor/patch-2
Upgrade CI workflow
2 parents 68e1b87 + 341adbc commit 9a572ca

File tree

1 file changed

+19
-26
lines changed

1 file changed

+19
-26
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: CI
22

33
on:
4-
pull_request:
4+
pull_request: null
55
push:
66
branches:
77
- "*.*"
8-
- master
8+
- "master"
99
schedule:
1010
- cron: "0 4 * * *"
1111

1212
jobs:
1313
tests:
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-22.04
1515
strategy:
1616
fail-fast: false
1717
matrix:
@@ -39,10 +39,10 @@ jobs:
3939
- php-version: '8.1'
4040
symfony-version: '5.4.*'
4141
dependencies: 'lowest'
42-
coverage: "pcov"
42+
coverage: 'pcov'
4343
steps:
4444
- name: "Checkout"
45-
uses: "actions/checkout@v2"
45+
uses: "actions/checkout@v4"
4646

4747
- name: "Install PHP"
4848
uses: "shivammathur/setup-php@v2"
@@ -51,10 +51,6 @@ jobs:
5151
php-version: "${{ matrix.php-version }}"
5252
coverage: "${{ matrix.coverage }}"
5353

54-
- name: "Change stability"
55-
if: "matrix.stability != ''"
56-
run: perl -pi -e 's/^}$/,"minimum-stability":"'"${{ matrix.minimum-stability }}"'"}/' composer.json && cat composer.json
57-
5854
- name: "Webonyx GraphQL version"
5955
if: "matrix.graphql-version != ''"
6056
run: composer require "webonyx/graphql-php:${{ matrix.graphql-version }}" --dev --no-update
@@ -64,57 +60,54 @@ jobs:
6460
run: composer remove --no-update ${{ matrix.remove-dependencies }}
6561

6662
- name: "Install dependencies"
67-
uses: ramsey/composer-install@v2
63+
uses: "ramsey/composer-install@v2"
6864
with:
6965
dependency-versions: ${{ matrix.dependencies }}
7066
env:
7167
SYMFONY_REQUIRE: "${{ matrix.symfony-version }}"
7268

7369
- name: "Run tests"
74-
run: composer test
70+
run: composer run test
7571

7672
- name: "Upload coverage results to Coveralls"
7773
if: "matrix.coverage == 'pcov'"
7874
env:
7975
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8076
run: |
81-
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.1/php-coveralls.phar
77+
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.6.0/php-coveralls.phar
8278
php php-coveralls.phar --coverage_clover=build/logs/clover.xml -v
79+
8380
coding-standard:
84-
runs-on: ubuntu-20.04
81+
runs-on: ubuntu-22.04
8582
name: Coding Standard
8683
steps:
8784
- name: "Checkout"
88-
uses: "actions/checkout@v2"
85+
uses: "actions/checkout@v4"
8986

9087
- name: "Install PHP"
9188
uses: "shivammathur/setup-php@v2"
9289
with:
9390
tools: flex
9491
php-version: "8.1"
92+
coverage: "none"
9593

9694
- name: "Install dependencies"
97-
uses: ramsey/composer-install@v2
95+
uses: "ramsey/composer-install@v2"
9896

9997
- name: "Check coding standard"
100-
run: composer check-cs
98+
run: composer run check-cs
10199

102100
static-analysis:
103-
runs-on: ubuntu-20.04
101+
runs-on: ubuntu-22.04
104102
name: "Static analysis"
105-
strategy:
106-
fail-fast: false
107-
matrix:
108-
php-version:
109-
- '8.1'
110103
steps:
111104
- name: "Checkout"
112-
uses: "actions/checkout@v2"
105+
uses: "actions/checkout@v4"
113106

114107
- name: "Install PHP"
115108
uses: "shivammathur/setup-php@v2"
116109
with:
117-
php-version: ${{ matrix.php-version }}
110+
php-version: "8.1"
118111
coverage: "none"
119112

120113
- name: "Cache dependencies installed with composer"
@@ -125,7 +118,7 @@ jobs:
125118
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
126119

127120
- name: "Install dependencies"
128-
uses: ramsey/composer-install@v2
121+
uses: "ramsey/composer-install@v2"
129122

130123
- name: "Run static-analysis"
131-
run: composer static-analysis
124+
run: composer run static-analysis

0 commit comments

Comments
 (0)