-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.62 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
56
57
58
name: Tests
on: [push, pull_request]
jobs:
tests:
name: Tests PHP ${{ matrix.php }}
runs-on: ubuntu-latest
# continue-on-error: ${{ matrix.experimental }}
# strategy:
# matrix:
# php: [8.1]
# experimental: [false]
# include:
# - php: 8.1
# analysis: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: xdebug
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-
- name: Install dependencies with Composer
uses: php-actions/composer@master
with:
php_version: "8.1"
php_extensions: calendar mbstring intl xdebug
args: -q --no-ansi --no-progress --no-interaction --prefer-dist --optimize-autoloader
- name: Execute tests (Unit and Feature tests) via PestPHP
run: vendor/bin/pest --coverage --min=90 --coverage-clover clover.xml
# - name: PhpUnit Tests
# uses: php-actions/phpunit@v3
# with:
# php_version: 8.1
# php_extensions: calendar mbstring intl xdebug
# bootstrap: vendor/autoload.php
# configuration: tests/phpunit.xml
# args: --coverage-text
# env:
# XDEBUG_MODE: coverage
- uses: actions/upload-artifact@v4
with:
name: debug-output
path: output.log