-
Notifications
You must be signed in to change notification settings - Fork 23
62 lines (56 loc) · 1.78 KB
/
php.yml
File metadata and controls
62 lines (56 loc) · 1.78 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
name: PHP Composer
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
- 'doc/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
php-versions: [7.2, 7.4]
name: PHP ${{ matrix.php-versions }} Test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP Action
uses: shivammathur/setup-php@2.9.0
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate --no-check-lock
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist
- name: Run test suite with phpunit
env:
LEANCLOUD_API_SERVER: https://wndg0lpt.api.lncldglobal.com
LEANCLOUD_APP_ID: wnDg0lPt0wcYGJSiHRwHBhD4
LEANCLOUD_APP_KEY: u9ekx9HFSFFBErWwyWHFmPDy
LEANCLOUD_APP_MASTER_KEY: ${{ secrets.MASTER_KEY }}
LEANCLOUD_REGION: US
LEANCLOUD_APP_HOST: 127.0.0.1
LEANCLOUD_APP_PORT: 8081
LEANCLOUD_WILDCARD_DOMAIN: lncldglobal.com
LEANCLOUD_APP_ENV: production
run: |
make test_engine &
php -r 'exit(PHP_VERSION_ID >= 70200 ? 0 : 1);' || vendor/bin/phpunit test/Php72ObjectDeprecated.php
vendor/bin/phpunit --coverage-text