Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
22 changes: 22 additions & 0 deletions .github/workflows/bench.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
name: "Benchmarks"

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

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Install dependencies
run: composer install --prefer-dist

- name: Run Benchmarks
run: composer bench -- --progress=plain
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
name: "Linter"

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

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Install dependencies
run: composer install --prefer-dist

- name: Run Linter
run: composer lint
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
name: "Tests"

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

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Setup Docker
run: docker-compose up -d --build

- name: Wait for Server to be ready
run: sleep 10

- name: Run Tests
run: docker compose exec web vendor/bin/phpunit --configuration phpunit.xml
26 changes: 0 additions & 26 deletions .gitlab-ci.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@ ENV DEBIAN_FRONTEND=noninteractive \

RUN \
apk add --no-cache --virtual .deps \
supervisor php$PHP_VERSION php$PHP_VERSION-fpm nginx bash
supervisor php$PHP_VERSION php$PHP_VERSION-fpm php$PHP_VERSION-mbstring nginx bash


# Nginx Configuration (with self-signed ssl certificates)
Expand All@@ -38,7 +38,7 @@ COPY ./tests/docker/start /usr/local/bin/start
COPY ./src /usr/share/nginx/html/src
COPY ./tests /usr/share/nginx/html/tests
COPY ./phpunit.xml /usr/share/nginx/html/phpunit.xml
COPY ./psalm.xml /usr/share/nginx/html/psalm.xml
COPY ./phpbench.json /usr/share/nginx/html/phpbench.json
COPY --from=step0 /usr/local/src/vendor /usr/share/nginx/html/vendor

# Supervisord Conf
Expand Down
22 changes: 15 additions & 7 deletions composer.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,24 +2,32 @@
"name": "utopia-php/framework",
"description": "A simple, light and advanced PHP framework",
"type": "library",
"keywords": ["php","framework", "upf"],
"keywords": [
"php",
"framework",
"upf"
],
"license": "MIT",
"minimum-stability": "stable",
"autoload": {
"psr-4": {"Utopia\\": "src/"}
"psr-4": {
"Utopia\\": "src/"
}
},
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint",
"check": "./vendor/bin/phpstan analyse -l 5 src tests"
"lint": "vendor/bin/pint --test",
"format": "vendor/bin/pint",
"check": "vendor/bin/phpstan analyse -c phpstan.neon",
"test": "vendor/bin/phpunit --configuration phpunit.xml",
"bench": "vendor/bin/phpbench run --report=benchmark"
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5.25",
"vimeo/psalm": "4.27.0",
"laravel/pint": "^1.2",
"phpstan/phpstan": "1.9.x-dev"
"phpstan/phpstan": "^1.10",
"phpbench/phpbench": "^1.2"
}
}
Loading