-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (59 loc) · 1.86 KB
/
test-phpunit.yml
File metadata and controls
68 lines (59 loc) · 1.86 KB
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
name: PHPUnit
on:
push:
branches:
- dev
paths:
- 'src/**'
- 'test/**'
- composer.json
- '**.php'
- .github/workflows/test-phpunit.yml
pull_request:
branches:
- dev
paths:
- 'src/**'
- 'test/**'
- composer.json
- '**.php'
- .github/workflows/test-phpunit.yml
jobs:
tests:
runs-on: ubuntu-18.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: PHP ${{ matrix.php-ver }}
strategy:
fail-fast: false
matrix:
php-ver: ['7.3','7.4']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
run: |
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update -y
sudo apt-get install php${{ matrix.php-ver }}
sudo apt install php-pear php${{ matrix.php-ver }}-curl php${{ matrix.php-ver }}-dev php${{ matrix.php-ver }}-mbstring php${{ matrix.php-ver }}-zip php${{ matrix.php-ver }}-mysql php${{ matrix.php-ver }}-xml php${{ matrix.php-ver }}-fpm php${{ matrix.php-ver }}-intl -y
sudo apt-get update -y
sudo apt-get install -y php-xdebug
sudo curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
- name: Install dependencies
working-directory: ./test
run: |
composer update
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
- name: Init roadrunner server
working-directory: ./test
run: |
sudo ./vendor/bin/rr get
cp ../src/Commands/file/psr-worker.php psr-worker.php
sudo ./rr serve -v -d &
- name: Test with PHPUnit
working-directory: ./test
run: script -e -c "vendor/bin/phpunit -v"
env:
TERM: xterm-256color