Skip to content

Commit 0986d7d

Browse files
authored
Update run-tests.yml
1 parent aeaa946 commit 0986d7d

File tree

1 file changed

+37
-29
lines changed

1 file changed

+37
-29
lines changed

.github/workflows/run-tests.yml

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

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
46

57
jobs:
6-
test:
7-
runs-on: ${{ matrix.os }}
8+
run:
9+
runs-on: 'ubuntu-latest'
810
strategy:
9-
fail-fast: true
11+
fail-fast: false
1012
matrix:
11-
php: ['8.2','8.3']
13+
php: ['8.1', '8.2','8.3']
1214
os: [ubuntu-latest]
1315
stability: [prefer-stable]
14-
laravel: [10.*, 11.*]
16+
laravel: [9.*, 10.*, 11.*]
1517
include:
18+
- laravel: 9.*
19+
testbench: 7.*
1620
- laravel: 10.*
1721
testbench: 7.*
1822
- laravel: 11.*
1923
testbench: 7.*
2024

21-
22-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
25+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2326

2427
steps:
25-
- name: Checkout code
26-
uses: actions/checkout@v2
27-
28-
- name: Setup PHP
29-
uses: shivammathur/setup-php@v2
30-
with:
31-
php-version: ${{ matrix.php }}
32-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
33-
coverage: none
34-
35-
- name: Setup problem matchers
36-
run: |
37-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
38-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
39-
- name: Install dependencies
40-
run: |
41-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
42-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
43-
- name: Execute tests
44-
run: vendor/bin/phpunit
28+
- name: Checkout code
29+
uses: actions/checkout@v3
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
extensions: bcmath, curl, dom, mbstring, pcntl, sockets, xml, intl
36+
coverage: none
37+
38+
- name: Set up Docker
39+
run: |
40+
sudo rm /usr/local/bin/docker-compose
41+
curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-`uname -s`-`uname -m` > docker-compose
42+
chmod +x docker-compose
43+
sudo mv docker-compose /usr/local/bin
44+
- name: Start Docker container
45+
run: docker-compose up -d
46+
47+
- name: Install dependencies
48+
run: |
49+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
50+
51+
- name: Execute tests
52+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)