Skip to content

Commit e28c983

Browse files
authored
Merge pull request #40 from kudashevs/feature/update_ci_unit_tests
Update the run unit tests github action and add PHP 8.3 support
2 parents 0f447eb + 236c48c commit e28c983

File tree

1 file changed

+21
-29
lines changed

1 file changed

+21
-29
lines changed

.github/workflows/unit-tests.yml

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,44 @@
1-
name: "PHPUnit tests"
1+
name: Tests
22

33
on:
44
pull_request:
55
push:
66

77
jobs:
8-
phpunit:
9-
name: "PHPUnit tests"
10-
11-
runs-on: ${{ matrix.operating-system }}
12-
8+
tests:
9+
name: Tests PHP ${{ matrix.php }}
10+
runs-on: ${{ matrix.os }}
1311
strategy:
12+
fail-fast: false
1413
matrix:
15-
php-version:
16-
- "7.2"
17-
- "7.3"
18-
- "7.4"
19-
- "8.0"
20-
- "8.1"
21-
- "8.2"
22-
operating-system:
23-
- "ubuntu-latest"
14+
os: [ubuntu-latest]
15+
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
2416

2517
steps:
26-
- name: "Checkout"
27-
uses: "actions/checkout@v2"
18+
- name: Checkout
19+
uses: actions/checkout@v4
2820
with:
2921
fetch-depth: 0
3022

31-
- name: "Install PHP"
32-
uses: "shivammathur/setup-php@v2"
23+
- name: Install PHP
24+
uses: shivammathur/setup-php@v2
3325
with:
34-
coverage: "pcov"
35-
php-version: "${{ matrix.php-version }}"
26+
coverage: pcov
27+
php-version: ${{ matrix.php }}
3628
ini-values: memory_limit=-1
3729
tools: composer:v2, cs2pr
3830

39-
- name: "Cache dependencies"
40-
uses: "actions/cache@v2"
31+
- name: Cache dependencies
32+
uses: actions/cache@v3
4133
with:
4234
path: |
4335
~/.composer/cache
4436
vendor
45-
key: "php-${{ matrix.php-version }}"
46-
restore-keys: "php-${{ matrix.php-version }}"
37+
key: php-${{ matrix.php }}
38+
restore-keys: php-${{ matrix.php }}
4739

48-
- name: "Install highest dependencies"
49-
run: "composer update --no-interaction --no-progress --no-suggest"
40+
- name: Install highest dependencies
41+
run: composer update --no-interaction --no-progress --no-suggest
5042

51-
- name: "Tests"
52-
run: "vendor/bin/phpunit"
43+
- name: Tests
44+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)