generated from offline-agency/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 7
69 lines (65 loc) · 1.92 KB
/
main.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
name: run-tests
on:
push:
branches:
tags:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
php: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
laravel: [5.8, 6.*, 7.*, 8.*, 9.*, 10.*, 11.*]
exclude:
- laravel: 9.*
php: 7.4
- laravel: 9.*
php: 7.3
- laravel: 10.*
php: 7.4
- laravel: 10.*
php: 7.3
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 7.4
- laravel: 11.*
php: 7.3
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: "Installing php"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl,mbstring,xdebug
coverage: xdebug
tools: composer
- name: Show PHP version
run: php -v && composer -V
- name: Download Composer cache dependencies from cache
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ matrix.os }}-composer-
- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction
- name: Run tests
run: |
./vendor/bin/phpunit --coverage-clover coverage.xml
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false