Skip to content

minor change

minor change #3

Workflow file for this run

name: Qodana Analysis
on:
push:
paths-ignore:
- '**.md'
- '**.txt'
- '**/nightly.yml'
- '**/release.yml'
- '**/FUNDING.yml'
env:
RE2C_VERSION: 2.2
ZEPHIR_PARSER_VERSION: 1.6.0
PSR_VERSION: 1.2.0
CACHE_DIR: .cache
jobs:
qodana-analysis:
name: "Qodana analysis"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Install PHP ${{ matrix.php }}
uses: shivammathur/setup-php@develop
with:
php-version: '8.0'
extensions: mbstring, fileinfo, gmp, sqlite, pdo_sqlite, psr-${{ env.PSR_VERSION }}, zip, mysqli, zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}
tools: phpize, php-config
coverage: xdebug
# variables_order: https://github.com/zephir-lang/zephir/pull/1537
# enable_dl: https://github.com/zephir-lang/zephir/pull/1654
# allow_url_fopen: https://github.com/zephir-lang/zephir/issues/1713
# error_reporting: https://github.com/zendframework/zend-code/issues/160
ini-values: >-
variables_order=EGPCS,
enable_dl=On,
allow_url_fopen=On,
error_reporting=-1,
memory_limit=1G,
date.timezone=UTC,
xdebug.max_nesting_level=256
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Get composer cache directory
# id: composer-cache
# run: echo "::set-output name=dir::$(composer config cache-files-dir)"
# - name: Set Up Composer Cache
# uses: actions/cache@v3
# with:
# path: ${{ steps.composer-cache.outputs.dir }}
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
# restore-keys: ${{ runner.os }}-composer-
- name: Install Project Dependencies
run: |
echo "::group::Install composer dependencies"
composer install --prefer-dist --no-interaction --no-ansi --no-progress
echo "::endgroup::"
- name: Fast Commands Test
run: php zephir --help
- name: Build Test Extension (Linux)
uses: ./.github/workflows/build-linux-ext
with:
compiler: 'gcc'
cflags: '-O2 -Wall -fvisibility=hidden -flto -DZEPHIR_RELEASE=1'
ldflags: '--coverage'
- name: Stub Extension Info
shell: pwsh
run: |
php --ini
php --ri stub
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Unit Tests (Stub Extension)
shell: pwsh
run: |
php vendor/bin/phpunit -c phpunit.ext.xml --coverage-php ./tests/output/ext-clover.xml
- name: Unit Tests (Zephir)
if: always()
run: php vendor/bin/phpunit --testsuite Zephir --coverage-php ./tests/output/clover.xml
env:
XDEBUG_MODE: coverage
- name: Black-box Testing
if: always() && runner.os != 'Windows'
shell: bash
working-directory: tests/sharness
run: |
make -j$(getconf _NPROCESSORS_ONLN)
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2
with:
args: --baseline,qodana.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
- name: "Upload to Qodana"
run: |
docker run \
-v $(pwd):/data/project/ \
-v ./tests/output/:/data/coverage \
-e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \
jetbrains/qodana-php