Skip to content

Commit

Permalink
Move CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Dec 14, 2020
1 parent 81b4dd4 commit 1e75f1d
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 252 deletions.
67 changes: 56 additions & 11 deletions .github/workflows/ci.yml
Expand Up @@ -16,6 +16,9 @@ jobs:
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"

services:
Expand All @@ -36,10 +39,11 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: pdo_mysql
coverage: xdebug

- name: Install composer dependencies
run: composer install --no-interaction --no-progress --no-suggest
uses: "ramsey/composer-install@v1"

- name: Run PHPUnit
run: vendor/bin/phpunit
Expand All @@ -61,6 +65,51 @@ jobs:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.php-version == '8.0' }}

phpunit-mariadb:
name: PHPUnit MariaDB
runs-on: ubuntu-20.04

strategy:
matrix:
php-version:
- "8.0"

services:
mariadb:
image: "mariadb:10.1"
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
options: >-
--health-cmd "mysqladmin ping --silent"
ports:
- "3306:3306"

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: pdo_mysql
coverage: xdebug

- name: Install composer dependencies
uses: "ramsey/composer-install@v1"

- name: Run PHPUnit with coverage
run: |
mkdir -p mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
env:
ENGINE: PDO_MYSQL

- name: Upload coverage report to Coveralls
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

phpunit-postgres:
name: PHPUnit PostgreSQL
runs-on: ubuntu-20.04
Expand All @@ -85,10 +134,11 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: pdo_pgsql
coverage: xdebug

- name: Install composer dependencies
run: composer install --no-interaction --no-progress --no-suggest
uses: "ramsey/composer-install@v1"

- name: Run PHPUnit with coverage
run: |
Expand Down Expand Up @@ -127,7 +177,7 @@ jobs:
run: sudo apt install libsqlite3-mod-spatialite

- name: Install composer dependencies
run: composer install --no-interaction --no-progress --no-suggest
uses: "ramsey/composer-install@v1"

- name: Run PHPUnit with coverage
run: |
Expand Down Expand Up @@ -158,23 +208,18 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: geos
coverage: xdebug

- name: Install GEOS
run: bash ci/install-geos.sh

- name: Setup Debug Session
uses: csexton/debugger-action@master

- name: Install composer dependencies
run: composer install --no-interaction --no-progress --no-suggest
uses: "ramsey/composer-install@v1"

- name: Run PHPUnit with coverage
run: |
mkdir -p mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
env:
ENGINE: SQLite3
ENGINE: GEOS

- name: Upload coverage report to Coveralls
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
Expand Down
79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

27 changes: 0 additions & 27 deletions ci/install-geos.sh

This file was deleted.

7 changes: 0 additions & 7 deletions ci/install-mariadb.sh

This file was deleted.

15 changes: 0 additions & 15 deletions ci/install-postgis.sh

This file was deleted.

3 changes: 0 additions & 3 deletions ci/install-spatialite.sh

This file was deleted.

110 changes: 0 additions & 110 deletions travis-matrix.php

This file was deleted.

0 comments on commit 1e75f1d

Please sign in to comment.