Skip to content

Commit

Permalink
Merge pull request #21 from utopia-php/feat-worker-stop
Browse files Browse the repository at this point in the history
Feat worker stop
  • Loading branch information
abnegate authored Apr 9, 2024
2 parents a58acff + 71ffdb4 commit e9d0919
Show file tree
Hide file tree
Showing 18 changed files with 1,246 additions and 2,788 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Tests"

on: [pull_request]
jobs:
tests:
name: Unit & E2E
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: [
'8.0',
'8.1',
'8.2',
'8.3'
]

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: recursive

- run: git checkout HEAD^2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build image
uses: docker/build-push-action@v3
with:
context: .
file: php-${{ matrix.php-versions }}.Dockerfile
push: false
tags: websocket-${{ matrix.php-versions }}-dev
load: true
outputs: type=cacheonly
cache-from: type=gha,scope=${{ matrix.php-versions }}
cache-to: type=gha,mode=max,scope=${{ matrix.php-versions }}

- name: Start Containers
run: |
export PHP_VERSION=${{ matrix.php-versions }}
docker compose up -d
sleep 10
- name: Run Tests
run: docker compose exec tests vendor/bin/phpunit
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

15 changes: 8 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@
"keywords": ["php","framework", "upf", "utopia", "websocket"],
"license": "MIT",
"scripts": {
"test": "./vendor/bin/phpunit",
"lint": "./vendor/bin/pint --test --preset=psr12 src tests",
"format": "./vendor/bin/pint --preset=psr12 src tests",
"check": "./vendor/bin/phpstan analyse --level max src tests"
},
"minimum-stability": "stable",
"autoload": {
"psr-4": {"Utopia\\WebSocket\\": "src/WebSocket"}
},
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint"
"autoload-dev": {
"psr-4": {"Utopia\\WebSocket\\Tests\\": "tests/e2e"}
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"swoole/ide-helper": "4.6.6",
"swoole/ide-helper": "5.1.2",
"textalk/websocket": "1.5.2",
"phpunit/phpunit": "^9.5.5",
"vimeo/psalm": "^4.8.1",
"workerman/workerman": "^4.0",
"laravel/pint": "1.2.*",
"phpstan/phpstan": "^1.8"
"phpstan/phpstan": "^1.8",
"laravel/pint": "^1.15"
}
}
Loading

0 comments on commit e9d0919

Please sign in to comment.