mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
#10026 added GitHub CI for unit tests with PHP 8.2 and 8.3
This commit is contained in:
parent
9c814c8a69
commit
d39013324d
132
.github/workflows/ci.yml
vendored
132
.github/workflows/ci.yml
vendored
@ -69,8 +69,8 @@ jobs:
|
||||
echo "count=$(php -r 'echo json_encode([ ${{ env.CHUNK_COUNT }} ]);')" >> $GITHUB_OUTPUT
|
||||
echo "chunks=$(php -r 'echo json_encode(range(1, ${{ env.CHUNK_COUNT }} ));')" >> $GITHUB_OUTPUT
|
||||
|
||||
tests:
|
||||
name: "Unit Tests - ${{ matrix.chunk }}"
|
||||
tests_81:
|
||||
name: "Unit Tests PHP 8.1 - ${{ matrix.chunk }}"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
@ -88,7 +88,7 @@ jobs:
|
||||
PARALLEL_PROCESSES: 5
|
||||
|
||||
steps:
|
||||
- name: Set up PHP
|
||||
- name: Set up PHP 8.1
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.1'
|
||||
@ -128,5 +128,129 @@ jobs:
|
||||
env:
|
||||
COMPOSER_ROOT_VERSION: dev-master
|
||||
|
||||
- name: Run unit tests
|
||||
- name: Run unit tests php 8.1
|
||||
run: bin/tests-github-actions.sh
|
||||
|
||||
tests_82:
|
||||
name: "Unit Tests PHP 8.2 - ${{ matrix.chunk }}"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- chunk-matrix
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
count: ${{ fromJson(needs.chunk-matrix.outputs.count) }}
|
||||
chunk: ${{ fromJson(needs.chunk-matrix.outputs.chunks) }}
|
||||
|
||||
env:
|
||||
CHUNK_COUNT: "${{ matrix.count }}"
|
||||
CHUNK_NUMBER: "${{ matrix.chunk }}"
|
||||
PARALLEL_PROCESSES: 5
|
||||
|
||||
steps:
|
||||
- name: Set up PHP 8.2
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
ini-values: zend.assertions=1, assert.exception=1, opcache.enable_cli=1, opcache.jit=function, opcache.jit_buffer_size=512M
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
extensions: none, curl, dom, filter, intl, json, libxml, mbstring, opcache, openssl, pcre, phar, reflection, simplexml, spl, tokenizer, xml, xmlwriter
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get Composer Cache Directories
|
||||
id: composer-cache
|
||||
run: |
|
||||
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate composer.lock
|
||||
run: |
|
||||
composer update --no-install
|
||||
env:
|
||||
COMPOSER_ROOT_VERSION: dev-master
|
||||
|
||||
- name: Cache composer cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
${{ steps.composer-cache.outputs.files_cache }}
|
||||
${{ steps.composer-cache.outputs.vcs_cache }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Run composer install
|
||||
run: composer install -o
|
||||
env:
|
||||
COMPOSER_ROOT_VERSION: dev-master
|
||||
|
||||
- name: Run unit tests php 8.2
|
||||
run: bin/tests-github-actions.sh
|
||||
|
||||
tests_83:
|
||||
name: "Unit Tests PHP 8.3 - ${{ matrix.chunk }}"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- chunk-matrix
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
count: ${{ fromJson(needs.chunk-matrix.outputs.count) }}
|
||||
chunk: ${{ fromJson(needs.chunk-matrix.outputs.chunks) }}
|
||||
|
||||
env:
|
||||
CHUNK_COUNT: "${{ matrix.count }}"
|
||||
CHUNK_NUMBER: "${{ matrix.chunk }}"
|
||||
PARALLEL_PROCESSES: 5
|
||||
|
||||
steps:
|
||||
- name: Set up PHP 8.3
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.3'
|
||||
ini-values: zend.assertions=1, assert.exception=1, opcache.enable_cli=1, opcache.jit=function, opcache.jit_buffer_size=512M
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
extensions: none, curl, dom, filter, intl, json, libxml, mbstring, opcache, openssl, pcre, phar, reflection, simplexml, spl, tokenizer, xml, xmlwriter
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get Composer Cache Directories
|
||||
id: composer-cache
|
||||
run: |
|
||||
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate composer.lock
|
||||
run: |
|
||||
composer update --no-install
|
||||
env:
|
||||
COMPOSER_ROOT_VERSION: dev-master
|
||||
|
||||
- name: Cache composer cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
${{ steps.composer-cache.outputs.files_cache }}
|
||||
${{ steps.composer-cache.outputs.vcs_cache }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Run composer install
|
||||
run: composer install -o
|
||||
env:
|
||||
COMPOSER_ROOT_VERSION: dev-master
|
||||
|
||||
- name: Run unit tests php 8.3
|
||||
run: bin/tests-github-actions.sh
|
||||
|
@ -15,7 +15,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0",
|
||||
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
|
||||
"ext-SimpleXML": "*",
|
||||
"ext-ctype": "*",
|
||||
"ext-dom": "*",
|
||||
|
Loading…
Reference in New Issue
Block a user