Skip to content

Fix PHPStan version for PHP 7.1 #21

Fix PHPStan version for PHP 7.1

Fix PHPStan version for PHP 7.1 #21

Workflow file for this run

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 }}
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
php-extensions: ["dbase", ""]
os: [ubuntu-latest]
experimental: [false]
composer-options: ['']
include:
- { php-version: 'nightly', php-extensions: '', composer-options: '--ignore-platform-req=php', experimental: true, os: ubuntu-latest }
steps:
- uses: actions/checkout@v3
with:
# Fetch some commits for Scrutinizer coverage upload
fetch-depth: 15
- 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@v3
with:
path: ~/.composer/cache/
key: composer-cache
- name: Install dependencies
run: composer install --no-interaction ${{ matrix.composer-options }}
- 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@v3
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
# Do not run this step on forked versions of the main repository (example: contributor forks)
if: github.repository == 'phpmyadmin/shapefile'
with:
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"