php-parser/.github/workflows/main.yml

81 lines
2.3 KiB
YAML
Raw Permalink Normal View History

2020-12-08 23:00:10 +01:00
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: Main
on:
push:
pull_request:
jobs:
tests_70:
2021-09-05 16:50:42 +02:00
runs-on: "self-hosted"
2020-12-08 23:00:10 +01:00
name: "PHP 7.0 Unit Tests"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
2021-09-05 16:49:47 +02:00
- name: Setup PHP 7.0
env:
PHP_VERSION: "7.0"
run: |
echo "$HOME/.local/php/$PHP_VERSION" >> $GITHUB_PATH
2020-12-08 23:00:10 +01:00
- name: "Install dependencies"
run: |
composer update --no-progress --prefer-dist
- name: "Tests"
2021-09-05 16:49:47 +02:00
run: "php vendor/bin/phpunit"
2020-12-08 23:00:10 +01:00
tests:
2021-09-05 16:50:42 +02:00
runs-on: "self-hosted"
2020-12-08 23:00:10 +01:00
name: "PHP ${{ matrix.php-version }} Unit Tests"
strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
2021-07-21 11:58:38 +02:00
- "8.1"
include:
- php-version: "8.1"
flags: "--ignore-platform-req=php"
2020-12-08 23:00:10 +01:00
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
2021-09-05 16:48:08 +02:00
- name: Setup PHP ${{ matrix.php-version }}
env:
PHP_VERSION: ${{ matrix.php-version }}
run: |
echo "$HOME/.local/php/$PHP_VERSION" >> $GITHUB_PATH
2020-12-08 23:00:10 +01:00
- name: "Install dependencies"
run: "composer update --no-progress --prefer-dist ${{ matrix.flags }}"
2020-12-08 23:00:10 +01:00
- name: "PHPUnit"
run: "php vendor/bin/phpunit"
test_old_73_80:
2021-09-05 16:50:42 +02:00
runs-on: "self-hosted"
2020-12-08 23:00:10 +01:00
name: "PHP 7.3 Code on PHP 8.0 Integration Tests"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
2021-09-05 16:48:08 +02:00
- name: Setup PHP 8.0
env:
PHP_VERSION: "8.0"
run: |
echo "$HOME/.local/php/$PHP_VERSION" >> $GITHUB_PATH
2020-12-08 23:00:10 +01:00
- 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:
2021-09-05 16:50:42 +02:00
runs-on: "self-hosted"
2020-12-08 23:00:10 +01:00
name: "PHP 8.0 Code on PHP 7.0 Integration Tests"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
2021-09-05 16:48:08 +02:00
- name: Setup PHP 7.0
env:
PHP_VERSION: "7.0"
run: |
echo "$HOME/.local/php/$PHP_VERSION" >> $GITHUB_PATH
2020-12-08 23:00:10 +01:00
- name: "Install PHP 8 dependencies"
run: "composer update --no-progress --prefer-dist"
- name: "Tests"
run: "test_old/run-php-src.sh 8.0.0"