-
Notifications
You must be signed in to change notification settings - Fork 30
53 lines (41 loc) · 1.45 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
name: tests
on:
push:
pull_request:
jobs:
linux_tests:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: true
matrix:
php: ["5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
name: PHP ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, posix
coverage: none
- name: Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Setup tests for PHP < 7.4
if: matrix.php < 7.4
run: |
composer require --dev 'phpunit/phpunit:^4.8.36 || ^5.7.21 || ^6 || ^7' --no-update
sed -i 's/: void//g' tests/*.php
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Install GnuPG v1 (GnuPG v2 does not work with Github Actions)
run: sudo apt-get install -y gnupg1
- name: Execute tests
run: TESTS_GPG_BINARY=/usr/bin/gpg1 vendor/bin/phpunit --stop-on-error tests
- name: Upload artifacts
uses: actions/upload-artifact@master
if: failure()
with:
name: Logs
path: tests/debug.log