Skip to content

Commit

Permalink
Merge pull request #70 from utopia-php/feat-redis-adapter
Browse files Browse the repository at this point in the history
Feat Redis Adapter
  • Loading branch information
eldadfux authored Jul 7, 2024
2 parents b7be908 + 21a14d4 commit 55e184d
Show file tree
Hide file tree
Showing 21 changed files with 2,309 additions and 412 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Benchmarks"

on: [pull_request]
jobs:
lint:
name: Benchmarks
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build
run: |
docker compose build
docker compose up -d
sleep 10
- name: Run benchmark
run: |
docker compose exec tests vendor/bin/phpbench run --report=aggregate --progress=plain
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
sleep 10
- name: Run Tests
run: docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml tests
run: docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml
1 change: 1 addition & 0 deletions Dockerfile.php-8.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ COPY --from=step0 /src/vendor /code/vendor
COPY ./tests /code/tests
COPY ./src /code/src
COPY ./phpunit.xml /code/phpunit.xml
COPY ./phpbench.json /code/phpbench.json

CMD [ "tail", "-f", "/dev/null" ]
1 change: 1 addition & 0 deletions Dockerfile.php-8.2
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ COPY --from=step0 /src/vendor /code/vendor
COPY ./tests /code/tests
COPY ./src /code/src
COPY ./phpunit.xml /code/phpunit.xml
COPY ./phpbench.json /code/phpbench.json

CMD [ "tail", "-f", "/dev/null" ]
1 change: 1 addition & 0 deletions Dockerfile.php-8.3
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ COPY --from=step0 /src/vendor /code/vendor
COPY ./tests /code/tests
COPY ./src /code/src
COPY ./phpunit.xml /code/phpunit.xml
COPY ./phpbench.json /code/phpbench.json

CMD [ "tail", "-f", "/dev/null" ]
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@
"scripts": {
"check": "./vendor/bin/phpstan analyse --level max src tests",
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint"
"format": "./vendor/bin/pint",
"bench": "vendor/bin/phpbench run --report=aggregate"
},
"require": {
"php": ">=8.0",
"ext-pdo": "*",
"ext-curl": "*",
"ext-redis": "*",
"utopia-php/database": "0.50.*"
},
"require-dev": {
"phpunit/phpunit": "^9.4",
"phpstan/phpstan": "^1.9",
"laravel/pint": "1.5.*"
"laravel/pint": "1.5.*",
"phpbench/phpbench": "^1.2"
}
}
Loading

0 comments on commit 55e184d

Please sign in to comment.