Skip to content

Commit aa05d09

Browse files
Fixes Github Actions issues and Add support for PHP 8.0 (#3)
1 parent d436120 commit aa05d09

File tree

2 files changed

+61
-5
lines changed

2 files changed

+61
-5
lines changed

.github/workflows/main.yml

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
${{ runner.os }}-build-${{ env.cache-name }}-
3232
${{ runner.os }}-build-
3333
${{ runner.os }}-
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: ${{ matrix.php }}
38+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
39+
coverage: none
3440
- name: Install composer dependencies
3541
run: composer install --prefer-dist
3642
- name: Run phpstan analysis
@@ -47,6 +53,12 @@ jobs:
4753
php: [ 7.2, 7.3, 7.4 ]
4854
steps:
4955
- uses: actions/checkout@v1
56+
- name: Setup PHP
57+
uses: shivammathur/setup-php@v2
58+
with:
59+
php-version: ${{ matrix.php }}
60+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
61+
coverage: none
5062
- name: Update laravel version
5163
run: composer require "laravel/framework:5.7.*" "orchestra/testbench:3.7.*" --no-update
5264
- name: Remove some dev dependencies
@@ -63,6 +75,12 @@ jobs:
6375
php: [ 7.2, 7.3, 7.4 ]
6476
steps:
6577
- uses: actions/checkout@v1
78+
- name: Setup PHP
79+
uses: shivammathur/setup-php@v2
80+
with:
81+
php-version: ${{ matrix.php }}
82+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
83+
coverage: none
6684
- name: Update laravel version
6785
run: composer require "laravel/framework:5.8.*" "orchestra/testbench:3.8.*" --no-update
6886
- name: Remove some dev dependencies
@@ -71,14 +89,20 @@ jobs:
7189
run: composer install --prefer-dist
7290
- name: Run the test suite
7391
run: phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit
74-
laravel60:
92+
laravel6:
7593
needs: [ analysis ]
7694
runs-on: ubuntu-latest
7795
strategy:
7896
matrix:
7997
php: [ 7.2, 7.3, 7.4 ]
8098
steps:
8199
- uses: actions/checkout@v1
100+
- name: Setup PHP
101+
uses: shivammathur/setup-php@v2
102+
with:
103+
php-version: ${{ matrix.php }}
104+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
105+
coverage: none
82106
- name: Update laravel version
83107
run: composer require "laravel/framework:^6.0" "orchestra/testbench:^4.0" --no-update
84108
- name: Remove some dev dependencies
@@ -87,14 +111,20 @@ jobs:
87111
run: composer install --prefer-dist
88112
- name: Run the test suite
89113
run: phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit
90-
laravel70:
114+
laravel7:
91115
needs: [ analysis ]
92116
runs-on: ubuntu-latest
93117
strategy:
94118
matrix:
95119
php: [ 7.2, 7.3, 7.4 ]
96120
steps:
97121
- uses: actions/checkout@v1
122+
- name: Setup PHP
123+
uses: shivammathur/setup-php@v2
124+
with:
125+
php-version: ${{ matrix.php }}
126+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
127+
coverage: none
98128
- name: Update laravel version
99129
run: composer require "laravel/framework:^7.0" "orchestra/testbench:^5.0" --no-update
100130
- name: Remove some dev dependencies
@@ -103,12 +133,32 @@ jobs:
103133
run: composer install --prefer-dist
104134
- name: Run the test suite
105135
run: phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit
106-
laravel80:
136+
laravel8:
107137
needs: [analysis]
108138
runs-on: ubuntu-latest
109139
strategy:
110140
matrix:
111-
php: [7.4]
141+
php: [8.0]
142+
steps:
143+
- uses: actions/checkout@v1
144+
- name: Setup PHP
145+
uses: shivammathur/setup-php@v2
146+
with:
147+
php-version: ${{ matrix.php }}
148+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
149+
coverage: none
150+
- name: Remove some dev dependencies
151+
run: composer remove "ekino/phpstan-banned-code" "nunomaduro/larastan" "phpmd/phpmd" "phpstan/phpstan-deprecation-rules" "sebastian/phpcpd" --dev --no-update
152+
- name: Install composer dependencies
153+
run: composer install --prefer-dist
154+
- name: Run the test suite
155+
run: phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit
156+
laravel8-cov:
157+
needs: [ analysis ]
158+
runs-on: ubuntu-latest
159+
strategy:
160+
matrix:
161+
php: [ 7.4 ]
112162
steps:
113163
- uses: actions/checkout@v1
114164
- name: Cache composer dependencies
@@ -122,6 +172,12 @@ jobs:
122172
${{ runner.os }}-build-${{ env.cache-name }}-
123173
${{ runner.os }}-build-
124174
${{ runner.os }}-
175+
- name: Setup PHP
176+
uses: shivammathur/setup-php@v2
177+
with:
178+
php-version: ${{ matrix.php }}
179+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
180+
coverage: none
125181
- name: Install composer dependencies
126182
run: composer install --prefer-dist
127183
- name: Run the Coverage test suite

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"source": "https://github.com/richan-fongdasen/laravel-gcr-worker"
2020
},
2121
"require": {
22-
"php": ">=7.2",
22+
"php": "^7.2|^8.0",
2323
"illuminate/queue": "5.7.* || 5.8.* || ^6.0 || ^7.0 || ^8.0",
2424
"illuminate/support": "5.7.* || 5.8.* || ^6.0 || ^7.0 || ^8.0",
2525
"kainxspirits/laravel-pubsub-queue": "^0.5"

0 commit comments

Comments
 (0)