-
Notifications
You must be signed in to change notification settings - Fork 97
47 lines (42 loc) · 1.33 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
name: Tests
on:
push:
pull_request:
schedule:
- cron: "0 12 * * 1" # Every Monday at 12:00
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || false }}
strategy:
fail-fast: false
matrix:
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
include:
- php-version: '8.4'
test-ws: true
send-coverage: true
- php-version: '8.5'
experimental: true
steps:
# Download code from repository
- name: Checkout code
uses: actions/checkout@v4
# Setup PHP and Composer
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
# Run tests
- name: Run tests
env:
TEST_WEBSERVICES: ${{ !startsWith(github.ref, 'refs/pull/') && matrix.test-ws || false }}
run: composer install && vendor/bin/simple-phpunit --testdox
# Send coverage
- name: Send coverage
if: ${{ !startsWith(github.ref, 'refs/pull/') && matrix.send-coverage }}
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r build/clover.xml