mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-17 23:28:15 +01:00
3fb4b92f59
Updates the GitHub Actions from V2 to V3 (cherry picked from commit 1d0748ad35201d483816634dd4bfe55a6f26d857)
109 lines
3.1 KiB
YAML
109 lines
3.1 KiB
YAML
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
|
|
name: Main
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
tests_coverage:
|
|
runs-on: "ubuntu-latest"
|
|
name: "PHP 7.1 Unit Tests (with coverage)"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v3"
|
|
- name: "Install PHP"
|
|
uses: "shivammathur/setup-php@v2"
|
|
with:
|
|
coverage: "xdebug"
|
|
php-version: "7.1"
|
|
tools: composer:v2
|
|
- name: "Install dependencies"
|
|
run: |
|
|
composer require php-coveralls/php-coveralls:^2.2 --dev --no-update
|
|
composer update --no-progress --prefer-dist
|
|
- name: "Tests"
|
|
run: "php vendor/bin/phpunit --coverage-clover build/logs/clover.xml"
|
|
- name: Coveralls
|
|
env:
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: "php vendor/bin/php-coveralls"
|
|
if: ${{ success() }}
|
|
tests:
|
|
runs-on: "ubuntu-latest"
|
|
name: "PHP ${{ matrix.php-version }} Unit Tests"
|
|
strategy:
|
|
matrix:
|
|
php-version:
|
|
- "7.2"
|
|
- "7.3"
|
|
- "7.4"
|
|
- "8.0"
|
|
- "8.1"
|
|
- "8.2"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v3"
|
|
- name: "Install PHP"
|
|
uses: "shivammathur/setup-php@v2"
|
|
with:
|
|
coverage: "none"
|
|
php-version: "${{ matrix.php-version }}"
|
|
tools: composer:v2
|
|
- 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: "ubuntu-latest"
|
|
name: "PHP 7.3 Code on PHP 8.0 Integration Tests"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v3"
|
|
- name: "Install PHP"
|
|
uses: "shivammathur/setup-php@v2"
|
|
with:
|
|
coverage: "none"
|
|
php-version: "8.0"
|
|
tools: composer:v2
|
|
- 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: "ubuntu-latest"
|
|
name: "PHP 8.2 Code on PHP 7.1 Integration Tests"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v3"
|
|
- name: "Install PHP"
|
|
uses: "shivammathur/setup-php@v2"
|
|
with:
|
|
coverage: "none"
|
|
php-version: "7.1"
|
|
tools: composer:v2
|
|
- name: "Install PHP 8 dependencies"
|
|
run: "composer update --no-progress --prefer-dist"
|
|
- name: "Tests"
|
|
run: "test_old/run-php-src.sh 8.2.3"
|
|
phpstan:
|
|
runs-on: "ubuntu-latest"
|
|
name: "PHP ${{ matrix.php-version }} PHPStan"
|
|
strategy:
|
|
matrix:
|
|
php-version:
|
|
- "8.2"
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: "actions/checkout@v3"
|
|
- name: "Install PHP"
|
|
uses: "shivammathur/setup-php@v2"
|
|
with:
|
|
coverage: "none"
|
|
php-version: "${{ matrix.php-version }}"
|
|
tools: composer:v2
|
|
- name: "Install dependencies"
|
|
run: |
|
|
cd tools && composer install
|
|
- name: "PHPStan"
|
|
run: "php tools/vendor/bin/phpstan"
|