Skip to content

Commit 20e10a3

Browse files
committed
:octocat: CI update
1 parent d27812c commit 20e10a3

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22
# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml
33

44
on:
5-
- pull_request
6-
- push
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
711

812
name: "Continuous Integration"
913

1014
jobs:
1115

1216
static-code-analysis:
1317
name: "Static Code Analysis"
14-
1518
runs-on: ubuntu-latest
1619

1720
env:
@@ -20,7 +23,7 @@ jobs:
2023

2124
steps:
2225
- name: "Checkout"
23-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
2427

2528
- name: "Install PHP"
2629
uses: shivammathur/setup-php@v2
@@ -30,15 +33,16 @@ jobs:
3033
coverage: none
3134
extensions: ast, imagick, json
3235

33-
- name: "Update dependencies with composer"
34-
run: composer update --no-interaction --no-ansi --no-progress --no-suggest
36+
- name: "Install dependencies with composer"
37+
uses: ramsey/composer-install@v3
3538

3639
- name: "Run phan"
3740
run: php vendor/bin/phan
3841

42+
3943
tests:
4044
name: "Unit Tests"
41-
45+
needs: static-code-analysis
4246
runs-on: ${{ matrix.os }}
4347

4448
strategy:
@@ -50,10 +54,13 @@ jobs:
5054
php-version:
5155
- "7.4"
5256
- "8.0"
57+
- "8.1"
58+
- "8.2"
59+
- "8.3"
5360

5461
steps:
5562
- name: "Checkout"
56-
uses: actions/checkout@v2
63+
uses: actions/checkout@v4
5764

5865
- name: "Install PHP with extensions"
5966
uses: shivammathur/setup-php@v2
@@ -64,12 +71,12 @@ jobs:
6471
extensions: imagick, json
6572

6673
- name: "Install dependencies with composer"
67-
run: composer update --no-ansi --no-interaction --no-progress --no-suggest
74+
uses: ramsey/composer-install@v3
6875

6976
- name: "Run tests with phpunit"
7077
run: php vendor/phpunit/phpunit/phpunit --configuration=phpunit.xml
7178

7279
- name: "Send code coverage report to Codecov.io"
73-
uses: codecov/codecov-action@v1
80+
uses: codecov/codecov-action@v4
7481
with:
7582
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)