-
Notifications
You must be signed in to change notification settings - Fork 30
74 lines (64 loc) · 1.76 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Tests
on: [push, pull_request]
jobs:
linux:
name: Test on Linux
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: php${{ matrix.php-version }} -v
- run: php${{ matrix.php-version }} -m
- run: composer -V
- run: composer install --no-progress
- run: php${{ matrix.php-version }} vendor/bin/phpunit
windows:
name: Test on Windows
defaults:
run:
shell: cmd
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2']
arch: [x64]
ts: [nts]
steps:
- name: Setup PHP
id: setup-php
uses: cmb69/setup-php-sdk@v0.7
with:
version: ${{matrix.php-version}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: php -v
- run: echo extension=gmp>>C:\tools\php\php.ini
- run: php -m
- run: composer -V
- run: composer install --no-progress
- run: php vendor/bin/phpunit
code_coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
- run: composer install --no-progress
- run: mkdir -p build/logs
- run: phpdbg -qrr vendor/bin/phpunit
- run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
- env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: php php-coveralls.phar --verbose