forked from phpmyadmin/shapefile
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.87 KB
/
tests.yml
File metadata and controls
51 lines (49 loc) · 1.87 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
name: Run tests
on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
jobs:
test-php:
name: Test on php ${{ matrix.php-version }} (${{ matrix.php-extensions }}) and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0"]
php-extensions: ["dbase", ""]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ matrix.php-extensions }}
coverage: xdebug
- name: Cache module
uses: actions/cache@v2
with:
path: ~/.composer/cache/
key: composer-cache
- name: Install dependencies
run: composer install
- name: Run php tests
run: composer run phpunit
- name: Run php examples
run: |
php -f examples/create_shapefile.php
php -f examples/read_point.php > /dev/null
php -f examples/read_polygon.php > /dev/null
- name: Send coverage
uses: codecov/codecov-action@v1
with:
flags: unit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
name: phpunit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
- name: Send coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
# Upload can fail on forks
continue-on-error: true
with:
cli-args: "--format=php-clover build/logs/clover.xml"