mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-26 12:04:39 +01:00
81 lines
2.3 KiB
YAML
81 lines
2.3 KiB
YAML
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
|
|
name: Main
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
tests_70:
|
|
runs-on: "self-hosted"
|
|
name: "PHP 7.0 Unit Tests"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v2"
|
|
- name: Setup PHP 7.0
|
|
env:
|
|
PHP_VERSION: "7.0"
|
|
run: |
|
|
echo "$HOME/.local/php/$PHP_VERSION" >> $GITHUB_PATH
|
|
- name: "Install dependencies"
|
|
run: |
|
|
composer update --no-progress --prefer-dist
|
|
- name: "Tests"
|
|
run: "php vendor/bin/phpunit"
|
|
tests:
|
|
runs-on: "self-hosted"
|
|
name: "PHP ${{ matrix.php-version }} Unit Tests"
|
|
strategy:
|
|
matrix:
|
|
php-version:
|
|
- "7.1"
|
|
- "7.2"
|
|
- "7.3"
|
|
- "7.4"
|
|
- "8.0"
|
|
- "8.1"
|
|
include:
|
|
- php-version: "8.1"
|
|
flags: "--ignore-platform-req=php"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v2"
|
|
- name: Setup PHP ${{ matrix.php-version }}
|
|
env:
|
|
PHP_VERSION: ${{ matrix.php-version }}
|
|
run: |
|
|
echo "$HOME/.local/php/$PHP_VERSION" >> $GITHUB_PATH
|
|
- name: "Install dependencies"
|
|
run: "composer update --no-progress --prefer-dist ${{ matrix.flags }}"
|
|
- name: "PHPUnit"
|
|
run: "php vendor/bin/phpunit"
|
|
test_old_73_80:
|
|
runs-on: "self-hosted"
|
|
name: "PHP 7.3 Code on PHP 8.0 Integration Tests"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v2"
|
|
- name: Setup PHP 8.0
|
|
env:
|
|
PHP_VERSION: "8.0"
|
|
run: |
|
|
echo "$HOME/.local/php/$PHP_VERSION" >> $GITHUB_PATH
|
|
- name: "Install PHP 8 dependencies"
|
|
run: "composer update --no-progress --prefer-dist"
|
|
- name: "Tests"
|
|
run: "test_old/run-php-src.sh 7.3.21"
|
|
test_old_80_70:
|
|
runs-on: "self-hosted"
|
|
name: "PHP 8.0 Code on PHP 7.0 Integration Tests"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v2"
|
|
- name: Setup PHP 7.0
|
|
env:
|
|
PHP_VERSION: "7.0"
|
|
run: |
|
|
echo "$HOME/.local/php/$PHP_VERSION" >> $GITHUB_PATH
|
|
- name: "Install PHP 8 dependencies"
|
|
run: "composer update --no-progress --prefer-dist"
|
|
- name: "Tests"
|
|
run: "test_old/run-php-src.sh 8.0.0"
|