Skip to content

Commit 0cd9974

Browse files
committed
Made library compatible with PHP 8.4
### Changed - Made library compatible with PHP 8.4, closes #6. - Refactor GitHub Actions, related to #6. - Update dev dependencies, related to #6. - Remove dev dependencies `roave/no-leaks` and `boesing/psalm-plugin-stringf` due to conflict with newer PHP versions, related to #6.
1 parent 2e69ac5 commit 0cd9974

File tree

48 files changed

+274
-351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+274
-351
lines changed

.github/workflows/ci-code-style.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci-leak-test.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/ci-markdown-lint.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/ci-mutant-test.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci-phpstan.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci-psalm.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci-test.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
9+
yml-lint:
10+
runs-on: ubuntu-latest
11+
name: 'YML lint'
12+
timeout-minutes: 3
13+
steps:
14+
- uses: actions/checkout@v4
15+
- run: docker pull cytopia/yamllint
16+
- run: docker run --rm -t -v $(pwd):/data cytopia/yamllint --config-file=tests/.yamllint .
17+
18+
markdown-lint:
19+
runs-on: ubuntu-latest
20+
name: 'Markdown lint'
21+
timeout-minutes: 3
22+
steps:
23+
- uses: actions/checkout@v4
24+
- run: docker pull tmknom/markdownlint
25+
- run: docker run --rm -v $(pwd):/work tmknom/markdownlint '**/*.md' --config tests/.markdownlintrc --ignore vendor --ignore CHANGELOG.md --ignore var --ignore tmp
26+
27+
cs-lint:
28+
runs-on: ubuntu-latest
29+
name: 'CS Lint'
30+
timeout-minutes: 5
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: '8.4'
36+
tools: composer:v2
37+
- run: composer install --dev --ignore-platform-req=php --quiet
38+
shell: bash
39+
- run: PHP_CS_FIXER_IGNORE_ENV=1 composer cs:list
40+
shell: bash
41+
42+
psalm:
43+
runs-on: ubuntu-latest
44+
name: 'Psalm'
45+
timeout-minutes: 5
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: shivammathur/setup-php@v2
49+
with:
50+
php-version: '8.4'
51+
tools: composer:v2
52+
- run: composer install --ignore-platform-req=php --quiet
53+
shell: bash
54+
- run: composer psalm
55+
shell: bash
56+
57+
phpstan:
58+
runs-on: ubuntu-latest
59+
name: 'Phpstan'
60+
timeout-minutes: 5
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: shivammathur/setup-php@v2
64+
with:
65+
php-version: '8.4'
66+
tools: composer:v2
67+
- run: composer install --ignore-platform-req=php --quiet
68+
shell: bash
69+
- run: composer phpstan
70+
shell: bash
71+
72+
test-unit:
73+
runs-on: ubuntu-latest
74+
name: "Unit tests (PHP ${{ matrix.php-version }}, Neo4j ${{ matrix.neo4j-version }})"
75+
strategy:
76+
fail-fast: false
77+
matrix:
78+
php-version: ['8.2', '8.3', '8.4']
79+
neo4j-version: ['4.4', '5.1.0', '5.26.2']
80+
timeout-minutes: 5
81+
env:
82+
ENABLE_FEATURE_TEST: true
83+
NEO4J_VERSION: ${{ matrix.neo4j-version }}
84+
services:
85+
neo4j:
86+
image: neo4j:${{ matrix.neo4j-version }}-enterprise
87+
env:
88+
NEO4J_AUTH: neo4j/password
89+
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
90+
ports:
91+
- "7474:7474"
92+
- "7687:7687"
93+
steps:
94+
- uses: actions/checkout@v4
95+
- uses: shivammathur/setup-php@v2
96+
with:
97+
php-version: ${{ matrix.php-version }}
98+
tools: composer:v2
99+
- run: composer install --ignore-platform-req=php --quiet
100+
shell: bash
101+
- run: composer test
102+
shell: bash
103+
- run: cat ./tests/test.log
104+
shell: bash
105+
106+
test-unit-coverage:
107+
runs-on: ubuntu-latest
108+
name: "Running unit test coverage"
109+
env:
110+
XDEBUG_MODE: coverage
111+
timeout-minutes: 5
112+
needs:
113+
- test-unit
114+
steps:
115+
- uses: actions/checkout@v4
116+
- uses: shivammathur/setup-php@v2
117+
with:
118+
php-version: '8.4'
119+
extensions: xdebug
120+
tools: composer:v2
121+
- run: composer install --ignore-platform-req=php --quiet
122+
shell: bash
123+
- run: composer test:coverage:xml
124+
shell: bash
125+
- uses: paambaati/[email protected]
126+
env:
127+
CC_TEST_REPORTER_ID: 203d856fbc3ebebe66cc94cccde4429973298c7fb919df64a1557850cc9c8345
128+
with:
129+
coverageLocations: coverage.xml:clover
130+
- uses: actions/upload-artifact@v4
131+
with:
132+
name: coverage.xml
133+
path: coverage.xml
134+
135+
test-mutant:
136+
runs-on: ubuntu-latest
137+
name: 'Mutant Test'
138+
timeout-minutes: 5
139+
continue-on-error: true
140+
steps:
141+
- uses: actions/checkout@v4
142+
- uses: shivammathur/setup-php@v2
143+
with:
144+
php-version: '8.4'
145+
tools: composer:v2
146+
- run: composer install --ignore-platform-req=php --quiet
147+
shell: bash
148+
- run: composer test:mutant
149+
shell: bash

.github/workflows/ci-unit-test-coverage.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/ci-unit-test.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)