2020-03-02 15:17:41 +01:00
|
|
|
name: GitHubBuild
|
2020-01-10 14:24:58 +01:00
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2021-06-11 22:14:21 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-versions: ['7.2', '7.3', '7.4', '8.0' ]
|
2020-01-10 14:24:58 +01:00
|
|
|
|
|
|
|
steps:
|
2021-06-11 22:14:21 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-versions }}
|
|
|
|
tools: composer
|
2020-01-10 14:24:58 +01:00
|
|
|
|
|
|
|
- name: Validate composer.json and composer.lock
|
2021-06-11 22:14:21 +02:00
|
|
|
run: composer validate
|
2020-01-10 14:24:58 +01:00
|
|
|
|
2020-01-10 14:47:16 +01:00
|
|
|
- name: setup templates_c
|
|
|
|
run: mkdir templates_c || true
|
|
|
|
|
2020-01-31 16:27:43 +01:00
|
|
|
- name: touch config.local.php
|
2020-01-31 17:15:42 +01:00
|
|
|
run: touch config.local.php && php -v
|
2020-01-31 16:27:43 +01:00
|
|
|
|
2020-01-10 14:24:58 +01:00
|
|
|
- name: Install dependencies
|
2021-06-11 22:14:21 +02:00
|
|
|
run: composer install --prefer-dist -n
|
2020-01-10 14:24:58 +01:00
|
|
|
|
2020-02-23 20:01:09 +01:00
|
|
|
- name: Build/test
|
2021-06-11 22:14:21 +02:00
|
|
|
run: composer build
|
2020-02-23 20:01:09 +01:00
|
|
|
|
2021-06-11 22:55:02 +02:00
|
|
|
- name: build coveralls coverage
|
|
|
|
run: php -m xdebug.mode=coverage vendor/bin/phpunit tests
|
2020-03-02 14:33:47 +01:00
|
|
|
|
2020-03-02 14:19:26 +01:00
|
|
|
- name: Coveralls
|
2021-06-11 22:55:02 +02:00
|
|
|
run: vendor/bin/php-coveralls ./clover.xml || true
|
|
|
|
env:
|
|
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
|
|
|
|
|
|
post_build:
|
|
|
|
needs: [build]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: '7.4'
|
|
|
|
tools: composer
|
|
|
|
|
|
|
|
- name: setup templates_c
|
|
|
|
run: mkdir templates_c || true
|
|
|
|
|
|
|
|
- name: touch config.local.php
|
|
|
|
run: touch config.local.php && php -v
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: composer install --prefer-dist -n
|
|
|
|
|
|
|
|
- name: build coveralls coverage
|
2021-06-11 23:02:21 +02:00
|
|
|
run: php -d xdebug.mode=coverage vendor/bin/phpunit tests
|
2021-06-11 22:55:02 +02:00
|
|
|
|
|
|
|
- name: Coveralls
|
2021-10-12 23:12:26 +02:00
|
|
|
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v || true
|
2020-03-02 14:19:26 +01:00
|
|
|
env:
|
2020-04-14 22:03:10 +02:00
|
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
2021-06-11 22:14:21 +02:00
|
|
|
|