Skip to content

Commit fa0c601

Browse files
committed
New workflow
1 parent 15239c2 commit fa0c601

File tree

1 file changed

+41
-12
lines changed

1 file changed

+41
-12
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,55 @@
11
name: Tests
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
- master
8-
- development
3+
on: [push, pull_request]
94

105
jobs:
11-
run-tests:
12-
runs-on: ubuntu-latest
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ubuntu-latest]
12+
php: [7.3]
13+
laravel: [8.*]
14+
stability: [prefer-stable]
15+
include:
16+
- laravel: 8.*
17+
testbench: 6.*
18+
19+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
20+
1321
steps:
14-
- uses: actions/checkout@v1
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
30+
coverage: none
31+
32+
- name: Setup problem matchers
33+
run: |
34+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
35+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
36+
1537
- name: Copy ENV Laravel Configuration for CI
1638
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
17-
- name: Install Dependencies
18-
run: composer install
39+
40+
- name: Install dependencies
41+
run: |
42+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
43+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
44+
1945
- name: Install NPM Dependencies
2046
run: npm install
47+
2148
- name: Compile Assets
2249
run: npm run production
50+
2351
- name: Generate Key
2452
run: php artisan key:generate
25-
- name: Execute Tests
53+
54+
- name: Execute tests
2655
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)