-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.17 KB
/
tests.yaml
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
name: PHPUnit Tests
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# Checkout the code
- name: Checkout Code
uses: actions/[email protected]
# Setup PHP
- name: Setup PHP
uses: shivammathur/[email protected]
with:
php-version: '8.2'
coverage: xdebug
# Install dependencies
- name: Cache Composer dependencies
uses: actions/[email protected]
with:
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
run: |
composer install --prefer-dist --no-scripts --ignore-platform-reqs
# Run tests
- name: Run Unit Tests
run: |
vendor/bin/phpunit --coverage-text --coverage-clover reports/coverage.xml