-
Notifications
You must be signed in to change notification settings - Fork 17
73 lines (73 loc) · 2.57 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Test
on: [push, pull_request]
jobs:
phpunit:
runs-on: ubuntu-20.04
strategy:
matrix:
php: [ 8.0, 8.1, 8.2, 8.3]
laravel: [10.*, 9.*, 8.*, 7.*]
exclude:
- laravel: 7.*
php: 8.1
- laravel: 7.*
php: 8.2
- laravel: 7.*
php: 8.3
- laravel: 10.*
php: 8.0
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: ^5.2
name: php ${{ matrix.php }} on laravel ${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
extensions: bcmath, sqlite
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }}-php${{ matrix.php }}-L${{ matrix.laravel }}
restore-keys: |
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }}-php${{ matrix.php }}
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }}
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-suggest
- name: Test phpunit 9
if: matrix.laravel != '10.*'
run: ./vendor/bin/phpunit
- name: Test on phpunit 10
if: matrix.laravel == '10.*'
run: |
./vendor/bin/phpunit --migrate-configuration
./vendor/bin/phpunit
- name: send coverage to codecov.io
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./clover.xml
# - name: send coverage to codacy.com
# uses: codacy/codacy-coverage-reporter-action@master
# with:
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# coverage-reports: clover.xml