tg-file-decoder/.github/workflows/main.yml

49 lines
1.5 KiB
YAML
Raw Normal View History

2020-08-24 14:04:15 +02:00
name: build
on:
pull_request:
push:
jobs:
run:
2020-10-08 17:25:32 +02:00
runs-on: ubuntu-latest
2020-10-08 17:40:52 +02:00
container: shivammathur/node:bionic-${{ matrix.tag }}
2020-08-24 14:04:15 +02:00
strategy:
matrix:
2020-10-08 17:40:52 +02:00
tag: ["amd64"]
2020-10-08 17:29:46 +02:00
php: ["7.0", "7.1", "7.2", "7.3", "7.4"]
name: PHP ${{ matrix.php }} Test on ${{ matrix.tag }}
2020-08-24 14:04:15 +02:00
steps:
2020-10-08 17:29:46 +02:00
- name: Checkout
uses: actions/checkout@v2.3.3
2020-08-24 14:04:15 +02:00
- name: Setup PHP
2020-10-08 17:29:46 +02:00
# Inputs to manual.sh are in this order - php, extensions, ini-values, coverage, tools
2020-10-08 17:16:40 +02:00
run: curl -sL https://setup-php.com/manual.sh | bash -s ${{ matrix.php }} "mbstring, intl, sockets" "memory_limit=-1" "xdebug"
2020-08-24 14:04:15 +02:00
- name: Check environment
run: |
php --version
composer --version
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
2020-10-08 17:29:46 +02:00
key: ${{ matrix.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.os }}-composer-${{ matrix.php }}-
2020-08-24 14:04:15 +02:00
- name: Install dependencies
run: composer install --prefer-dist
- name: Run tests
env:
PHP_CS_FIXER_IGNORE_ENV: 1
2020-08-24 14:06:55 +02:00
TOKEN: ${{ secrets.TOKEN }}
DEST: ${{ secrets.DEST }}
2020-08-24 14:04:15 +02:00
run: |
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
vendor/bin/php-cs-fixer --diff --dry-run -v fix