-
Notifications
You must be signed in to change notification settings - Fork 183
48 lines (37 loc) · 1.35 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
name: Tests
on:
push:
pull_request:
jobs:
tests:
name: Tests (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4', '8.0', '8.1', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
coverage: xdebug
# Install composer dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"
- name: Run tests
run: vendor/bin/phpunit --coverage-text
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- run: echo "🍏 This job's status is ${{ job.status }}."