Skip to content

Commit

Permalink
Merge pull request #92 from utopia-php/feat-routing-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar authored Jul 30, 2023
2 parents 02d0504 + 557afb8 commit 1c8ed95
Show file tree
Hide file tree
Showing 34 changed files with 1,391 additions and 1,810 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff 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 number Diff line number Diff 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 number Diff line number Diff 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 number Diff line number Diff 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 number Diff line number Diff 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

0 comments on commit 1c8ed95

Please sign in to comment.