Skip to content

Commit c0f0178

Browse files
authored
Merge pull request msyk#85 from matsuo/testing-for-multiple-platforms
Update a workflow file for testing on multiple platforms and remove unnecessary dockerfiles for CI
2 parents f5c3a9f + 87ced37 commit c0f0178

9 files changed

Lines changed: 20 additions & 226 deletions

.github/workflows/php-7.2.dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/php-7.3.dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/php-7.4.dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/php-8.0.dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/php-8.1.dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/php-8.2.dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/php-8.3.dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/php-multiplatform.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/php.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,29 @@ on:
1313
jobs:
1414
test:
1515
name: Test
16-
runs-on: ubuntu-latest
16+
runs-on: ${{ matrix.os }}
17+
env:
18+
PHP_EXTENSIONS: mbstring, json, bcmath, zip, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, exif, gd, ldap, fileinfo
1719
strategy:
1820
matrix:
19-
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
21+
# https://github.com/shivammathur/setup-php?tab=readme-ov-file#cloud-osplatform-support
22+
os: [ 'ubuntu-22.04', 'windows-2022', 'macos-14' ]
23+
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
2024
steps:
21-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
22-
- name: Run docker-compose
23-
shell: bash
24-
run: |
25-
cp .github/workflows/php-${{ matrix.php }}.dockerfile Dockerfile
26-
docker-compose up -d
27-
sleep 30
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Install PHP with extensions
29+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
30+
with:
31+
php-version: ${{ matrix.php-version }}
32+
coverage: pcov
33+
extensions: ${{ env.PHP_EXTENSIONS }}
34+
35+
- name: Prepare environment
36+
run: composer update
2837

2938
- name: Run testing
30-
shell: bash
3139
run: |
32-
sleep 30
33-
docker-compose exec -T web sh -c "cd / && php -v && composer test"
40+
php -v
41+
composer test

0 commit comments

Comments
 (0)