-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.47 KB
/
Copy pathtests.yml
File metadata and controls
65 lines (52 loc) · 1.47 KB
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
name: tests
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
pest:
name: Pest (PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.3', '8.4']
laravel: ['12.*', '13.*']
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- name: Install dependencies
run: |
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Run Pest
run: vendor/bin/pest
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: pest
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
coverage: pcov
- name: Install dependencies
run: composer install --no-interaction --no-progress --prefer-dist
- name: Run Pest with coverage
run: vendor/bin/pest --coverage --coverage-clover=coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
files: coverage.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}