-
-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.93 KB
/
tests.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
name: Tests
on:
push:
pull_request:
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.3']
laravel: [11.*]
dependency-version: [prefer-lowest, prefer-stable]
testbench: [9.*]
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
- name: Setup PHP
uses: shivammathur/setup-php@2.28.0
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl, json, zip
coverage: xdebug
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
env:
APP_ENV: testing
- name: Run tests
run: composer test-clover-coverage
env:
APP_ENV: testing
- uses: codecov/codecov-action@v3.1.4
name: Push coverage to codecov
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./clover.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true