-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.37 KB
/
unit.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
on:
- "pull_request"
- "push"
name: "unit"
permissions:
contents: "read"
jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
php-version:
- "8.3"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "inotify, xdebug"
- name: "Cache dependencies installed with Composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}"
restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
- name: "Install dependencies with Composer"
run: "composer update --no-ansi --no-interaction --no-progress"
- name: "Add properties to the kernel"
run: "bin/plaisio --no-ansi plaisio:kernel-properties"
- name: "Run tests with PHPUnit"
run: "bin/phing unit"
- name: "Upload to Codecov"
uses: "codecov/codecov-action@v4"
with:
files: "test/coverage.xml"
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}