-
Notifications
You must be signed in to change notification settings - Fork 20
47 lines (37 loc) · 1.27 KB
/
ci.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
44
45
46
47
name: CI
on:
push:
paths-ignore:
- docs/**
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, pcov
- uses: actions/checkout@v4
- name: Get Composer cache directory path
id: composer-cache-dir-path
run: echo "path=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache-dir-path.outputs.path }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
composer bin all install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Execute tests
run: composer tests
- name: Generate coverage report
run: composer pcov
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/coverage.xml
verbose: true