Skip to content

Commit 3e24578

Browse files
committed
workflow files updated
1 parent f1b5890 commit 3e24578

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed

.github/workflows/run-tests.yml renamed to .github/workflows/main-branch-tests.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: Run tests
22

33
on:
44
push:
5-
pull_request:
6-
schedule:
7-
- cron: '0 0 * * *'
5+
branches:
6+
- main
87

98
jobs:
109
php-tests:
@@ -43,7 +42,6 @@ jobs:
4342
- laravel: 8.*
4443
php: 7.2
4544

46-
4745
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
4846

4947
steps:
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Run tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
php-tests:
8+
runs-on: ${{ matrix.os }}
9+
10+
strategy:
11+
matrix:
12+
php: [ 7.4 ]
13+
laravel: [ 8.* ]
14+
dependency-version: [ prefer-stable ]
15+
os: [ ubuntu-latest ]
16+
include:
17+
- laravel: 8.*
18+
testbench: 6.*
19+
20+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
31+
coverage: none
32+
tools: composer:v2
33+
34+
- name: Install dependencies
35+
run: |
36+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
37+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress
38+
39+
- name: Execute tests
40+
run: ./vendor/bin/phpunit

0 commit comments

Comments
 (0)