Skip to content

Merge pull request #7 from neo4j-php/github-issue/6 #3

Merge pull request #7 from neo4j-php/github-issue/6

Merge pull request #7 from neo4j-php/github-issue/6 #3

Workflow file for this run

name: Test
on:
- push
- pull_request
jobs:
yml-lint:
runs-on: ubuntu-latest
name: 'YML lint'
timeout-minutes: 3
steps:
- uses: actions/checkout@v4
- run: docker pull cytopia/yamllint
- run: docker run --rm -t -v $(pwd):/data cytopia/yamllint --config-file=tests/.yamllint .
markdown-lint:
runs-on: ubuntu-latest
name: 'Markdown lint'
timeout-minutes: 3
steps:
- uses: actions/checkout@v4
- run: docker pull tmknom/markdownlint
- run: docker run --rm -v $(pwd):/work tmknom/markdownlint '**/*.md' --config tests/.markdownlintrc --ignore vendor --ignore CHANGELOG.md --ignore var --ignore tmp
cs-lint:
runs-on: ubuntu-latest
name: 'CS Lint'
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
- run: composer install --dev --ignore-platform-req=php --quiet
shell: bash
- run: PHP_CS_FIXER_IGNORE_ENV=1 composer cs:list
shell: bash
psalm:
runs-on: ubuntu-latest
name: 'Psalm'
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
- run: composer install --ignore-platform-req=php --quiet
shell: bash
- run: composer psalm
shell: bash
phpstan:
runs-on: ubuntu-latest
name: 'Phpstan'
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
- run: composer install --ignore-platform-req=php --quiet
shell: bash
- run: composer phpstan
shell: bash
test-unit:
runs-on: ubuntu-latest
name: "Unit tests (PHP ${{ matrix.php-version }}, Neo4j ${{ matrix.neo4j-version }})"
strategy:
fail-fast: false
matrix:
php-version: ['8.2', '8.3', '8.4']
neo4j-version: ['4.4', '5.1.0', '5.26.2']
timeout-minutes: 5
env:
ENABLE_FEATURE_TEST: true
NEO4J_VERSION: ${{ matrix.neo4j-version }}
services:
neo4j:
image: neo4j:${{ matrix.neo4j-version }}-enterprise
env:
NEO4J_AUTH: neo4j/password
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
ports:
- "7474:7474"
- "7687:7687"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
- run: composer install --ignore-platform-req=php --quiet
shell: bash
- run: composer test
shell: bash
- run: cat ./tests/test.log
shell: bash
test-unit-coverage:
runs-on: ubuntu-latest
name: "Running unit test coverage"
env:
XDEBUG_MODE: coverage
timeout-minutes: 5
needs:
- test-unit
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: xdebug
tools: composer:v2
- run: composer install --ignore-platform-req=php --quiet
shell: bash
- run: composer test:coverage:xml
shell: bash
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: 203d856fbc3ebebe66cc94cccde4429973298c7fb919df64a1557850cc9c8345
with:
coverageLocations: coverage.xml:clover
- uses: actions/upload-artifact@v4
with:
name: coverage.xml
path: coverage.xml
test-mutant:
runs-on: ubuntu-latest
name: 'Mutant Test'
timeout-minutes: 5
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
- run: composer install --ignore-platform-req=php --quiet
shell: bash
- run: composer test:mutant
shell: bash