Skip to content

Commit a520bce

Browse files
authored
Merge pull request #15 from butschster/feature/content-search
File source improvements
2 parents 6d5e1f4 + 292f90b commit a520bce

File tree

64 files changed

+4341
-573
lines changed

Some content is hidden

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

64 files changed

+4341
-573
lines changed

.github/FUNDING.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
# These are supported funding model platforms
4+
5+
patreon: butschster

.github/labeler.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
3+
# this file is for the labeler workflow job
4+
# Documentation https://github.com/marketplace/actions/labeler
5+
6+
"bug":
7+
- head-branch: [ '^bug', '^fix', 'bug', 'fix' ]
8+
9+
"enhancement":
10+
- head-branch: [ '^feature', '^feat', 'feature' ]
11+
12+
"documentation":
13+
- changed-files:
14+
- any-glob-to-any-file: [ '.github/*.md', './*.md' ]
15+
16+
"maintenance":
17+
- changed-files:
18+
- any-glob-to-any-file: [ '.github/**/*' ]
19+
20+
"tests":
21+
- changed-files:
22+
- any-glob-to-any-file: [ 'tests/**/*', 'phpunit*', 'psalm*' ]
23+
24+
...
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
name: 🧹 Fix PHP coding standards
12+
13+
jobs:
14+
coding-standards:
15+
permissions:
16+
contents: write
17+
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master

.github/workflows/refactoring.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
paths:
6+
- 'src/**'
7+
- 'tests/**'
8+
- 'composer.*'
9+
push:
10+
paths:
11+
- 'src/**'
12+
- 'tests/**'
13+
- 'composer.*'
14+
15+
name: ⚙️ Refactoring
16+
17+
jobs:
18+
rector:
19+
timeout-minutes: 4
20+
runs-on: ${{ matrix.os }}
21+
concurrency:
22+
cancel-in-progress: true
23+
group: rector-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
strategy:
25+
fail-fast: true
26+
matrix:
27+
os:
28+
- ubuntu-latest
29+
php-version:
30+
- '8.2'
31+
dependencies:
32+
- locked
33+
steps:
34+
- name: 📦 Check out the codebase
35+
uses: actions/checkout@v4
36+
37+
- name: 🛠️ Setup PHP
38+
uses: shivammathur/[email protected]
39+
with:
40+
php-version: ${{ matrix.php-version }}
41+
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets, opcache, pcntl, posix
42+
ini-values: error_reporting=E_ALL
43+
coverage: none
44+
45+
- name: 🛠️ Setup problem matchers
46+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
47+
48+
- name: 🤖 Validate composer.json and composer.lock
49+
run: composer validate --ansi --strict
50+
51+
- name: 🔍 Get composer cache directory
52+
uses: wayofdev/gh-actions/actions/composer/[email protected]
53+
54+
- name: ♻️ Restore cached dependencies installed with composer
55+
uses: actions/cache@v4
56+
with:
57+
path: ${{ env.COMPOSER_CACHE_DIR }}
58+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
59+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
60+
61+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
62+
uses: wayofdev/gh-actions/actions/composer/[email protected]
63+
with:
64+
dependencies: ${{ matrix.dependencies }}
65+
66+
- name: 🔍 Run static analysis using rector/rector
67+
run: composer refactor:ci

.github/workflows/security.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
3+
name: 🔐 Security analysis
4+
5+
on: # yamllint disable-line rule:truthy
6+
pull_request:
7+
push:
8+
9+
jobs:
10+
security-analysis:
11+
timeout-minutes: 4
12+
runs-on: ${{ matrix.os }}
13+
concurrency:
14+
cancel-in-progress: true
15+
group: security-analysis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
os:
20+
- ubuntu-latest
21+
php-version:
22+
- '8.2'
23+
dependencies:
24+
- locked
25+
steps:
26+
- name: 📦 Check out the codebase
27+
uses: actions/checkout@v4
28+
29+
- name: 🛠️ Setup PHP
30+
uses: shivammathur/[email protected]
31+
with:
32+
php-version: ${{ matrix.php-version }}
33+
extensions: none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets
34+
ini-values: error_reporting=E_ALL
35+
coverage: none
36+
37+
- name: 🛠️ Setup problem matchers
38+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
39+
40+
- name: 🤖 Validate composer.json and composer.lock
41+
run: composer validate --ansi --strict
42+
43+
- name: 🔍 Get composer cache directory
44+
uses: wayofdev/gh-actions/actions/composer/[email protected]
45+
46+
- name: ♻️ Restore cached dependencies installed with composer
47+
uses: actions/cache@v4
48+
with:
49+
path: ${{ env.COMPOSER_CACHE_DIR }}
50+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
51+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
52+
53+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
54+
uses: wayofdev/gh-actions/actions/composer/[email protected]
55+
with:
56+
dependencies: ${{ matrix.dependencies }}
57+
58+
- name: 🐛 Check installed packages for security vulnerability advisories
59+
run: composer audit --ansi
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
paths:
6+
- 'src/**'
7+
- 'composer.*'
8+
push:
9+
paths:
10+
- 'src/**'
11+
- 'composer.*'
12+
13+
name: 🔍 Static analysis
14+
15+
jobs:
16+
psalm:
17+
timeout-minutes: 4
18+
runs-on: ${{ matrix.os }}
19+
concurrency:
20+
cancel-in-progress: true
21+
group: psalm-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
strategy:
23+
fail-fast: true
24+
matrix:
25+
os:
26+
- ubuntu-latest
27+
php-version:
28+
- '8.2'
29+
dependencies:
30+
- locked
31+
steps:
32+
- name: 📦 Check out the codebase
33+
uses: actions/checkout@v4
34+
35+
- name: 🛠️ Setup PHP
36+
uses: shivammathur/[email protected]
37+
with:
38+
php-version: ${{ matrix.php-version }}
39+
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets, opcache, pcntl, posix
40+
ini-values: error_reporting=E_ALL
41+
coverage: none
42+
43+
- name: 🛠️ Setup problem matchers
44+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
45+
46+
- name: 🤖 Validate composer.json and composer.lock
47+
run: composer validate --ansi --strict
48+
49+
- name: 🔍 Get composer cache directory
50+
uses: wayofdev/gh-actions/actions/composer/[email protected]
51+
52+
- name: ♻️ Restore cached dependencies installed with composer
53+
uses: actions/cache@v4
54+
with:
55+
path: ${{ env.COMPOSER_CACHE_DIR }}
56+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
57+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
58+
59+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
60+
uses: wayofdev/gh-actions/actions/composer/[email protected]
61+
with:
62+
dependencies: ${{ matrix.dependencies }}
63+
64+
- name: 🔍 Run static analysis using vimeo/psalm
65+
run: composer psalm:ci

.github/workflows/testing.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
3+
name: 🧪 Unit testing
4+
5+
on: # yamllint disable-line rule:truthy
6+
pull_request:
7+
branches:
8+
- main
9+
push:
10+
branches:
11+
- main
12+
13+
jobs:
14+
code-coverage:
15+
timeout-minutes: 4
16+
runs-on: ${{ matrix.os }}
17+
concurrency:
18+
cancel-in-progress: true
19+
group: code-coverage-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }}
20+
strategy:
21+
fail-fast: true
22+
matrix:
23+
os:
24+
- ubuntu-latest
25+
php-version:
26+
- '8.2'
27+
dependencies:
28+
- locked
29+
steps:
30+
- name: 📦 Check out the codebase
31+
uses: actions/checkout@v4
32+
33+
- name: 🛠️ Setup PHP
34+
uses: shivammathur/[email protected]
35+
with:
36+
php-version: ${{ matrix.php-version }}
37+
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets, opcache, pcntl, posix
38+
ini-values: error_reporting=E_ALL
39+
coverage: xdebug
40+
41+
- name: 🛠️ Setup problem matchers
42+
run: |
43+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
44+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
45+
46+
- name: 🤖 Validate composer.json and composer.lock
47+
run: composer validate --ansi --strict
48+
49+
- name: 🔍 Get composer cache directory
50+
uses: wayofdev/gh-actions/actions/composer/[email protected]
51+
52+
- name: ♻️ Restore cached dependencies installed with composer
53+
uses: actions/cache@v4
54+
with:
55+
path: ${{ env.COMPOSER_CACHE_DIR }}
56+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
57+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
58+
59+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
60+
uses: wayofdev/gh-actions/actions/composer/[email protected]
61+
with:
62+
dependencies: ${{ matrix.dependencies }}
63+
64+
- name: 🧪 Collect code coverage with Xdebug and pestphp/pest
65+
run: composer test:cc
66+
67+
- name: 📤 Upload code coverage report to Codecov
68+
uses: codecov/[email protected]
69+
with:
70+
files: .build/phpunit/logs/clover.xml
71+
token: ${{ secrets.CODECOV_TOKEN }}
72+
verbose: true
73+
74+
testing:
75+
timeout-minutes: 4
76+
runs-on: ${{ matrix.os }}
77+
concurrency:
78+
cancel-in-progress: true
79+
group: testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }}
80+
strategy:
81+
fail-fast: true
82+
matrix:
83+
os:
84+
- ubuntu-latest
85+
php-version:
86+
- '8.1'
87+
- '8.2'
88+
- '8.3'
89+
dependencies:
90+
- lowest
91+
- locked
92+
- highest
93+
include:
94+
- php-version: '8.4'
95+
dependencies: highest
96+
steps:
97+
- name: 📦 Check out the codebase
98+
uses: actions/checkout@v4
99+
100+
- name: 🛠️ Setup PHP
101+
uses: shivammathur/[email protected]
102+
with:
103+
php-version: ${{ matrix.php-version }}
104+
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets, opcache, pcntl, posix
105+
ini-values: error_reporting=E_ALL
106+
coverage: xdebug
107+
108+
- name: 🛠️ Setup problem matchers
109+
run: |
110+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
111+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
112+
113+
- name: 🤖 Validate composer.json and composer.lock
114+
run: composer validate --ansi --strict
115+
116+
- name: 🔍 Get composer cache directory
117+
uses: wayofdev/gh-actions/actions/composer/[email protected]
118+
119+
- name: ♻️ Restore cached dependencies installed with composer
120+
uses: actions/cache@v4
121+
with:
122+
path: ${{ env.COMPOSER_CACHE_DIR }}
123+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
124+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
125+
126+
- name: ⚙️ Remove platform configuration with composer
127+
if: matrix.dependencies != 'locked'
128+
run: composer config platform.php --ansi --unset
129+
130+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
131+
uses: wayofdev/gh-actions/actions/composer/[email protected]
132+
with:
133+
dependencies: ${{ matrix.dependencies }}
134+
135+
- name: 🧪 Run unit tests using phpunit/phpunit
136+
run: composer test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ docs
99
vendor
1010
node_modules
1111
.php-cs-fixer.cache
12-
.context
12+
.context
13+
runtime

0 commit comments

Comments
 (0)