Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @matusboa
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: ".github/workflows"
schedule:
interval: "weekly"
reviewers:
- "matusboa"
assignees:
- "matusboa"
commit-message:
prefix: "deps(github): "
- package-ecosystem: "composer"
directory: "./"
schedule:
interval: "weekly"
reviewers:
- "matusboa"
assignees:
- "matusboa"
commit-message:
prefix: "deps(composer): "
38 changes: 38 additions & 0 deletions .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Code Style

on:
pull_request:

jobs:
php-cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: 8.4
- uses: actions/cache@v4
with:
path: vendor
key: composer-8.4-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-8.4-
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- run: vendor/bin/php-cs-fixer fix
rector:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: 8.4
- uses: actions/cache@v4
with:
path: vendor
key: composer-8.4-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-8.4-
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- run: vendor/bin/rector process
24 changes: 24 additions & 0 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PHPStan

on:
push:
branches: [ main ]
pull_request:

jobs:
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: 8.4
- uses: actions/cache@v4
with:
path: vendor
key: composer-8.4-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-8.4-
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- run: vendor/bin/phpstan analyse
63 changes: 63 additions & 0 deletions .github/workflows/phpunit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: PHPUnit

on:
push:
branches: [ main ]
pull_request:

jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: pcov
- uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-
- run: composer install --no-interaction --no-progress
- run: vendor/bin/phpunit --testsuite unit --coverage-clover build/logs/clover.xml
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ github.token }}

integration:
runs-on: ubuntu-latest
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:9.2.1
env:
discovery.type: single-node
xpack.security.enabled: false
ports:
- 9200:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
- uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-
- run: composer install --no-interaction --no-progress
- run: ./scripts/import_dataset.php
env:
ELASTICSEARCH_HOST: localhost:9200
- run: vendor/bin/phpunit --testsuite integration
env:
ELASTICSEARCH_HOST: localhost:9200
20 changes: 20 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Create release

on:
push:
tags:
- "v*.*.*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.phpunit.result.cache
.idea
vendor
.php-cs-fixer.cache
Loading