Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies #27

Merged
merged 9 commits into from
Jul 25, 2023
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
37 changes: 37 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Tests"

on: [pull_request]
jobs:
tests:
name: Unit & E2E
runs-on: ubuntu-latest

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: .
push: false
tags: swoole-dev
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Start Swoole
run: |
docker compose up -d
sleep 10

- name: Run Tests
run: docker compose exec -T php vendor/bin/phpunit --configuration phpunit.xml
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ COPY ./composer.lock /src/
RUN composer install --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist

FROM php:8.0-cli-alpine as step1
FROM php:8.0.18-cli-alpine3.15 as step1

ENV PHP_SWOOLE_VERSION=v4.8.3
ENV PHP_SWOOLE_VERSION=v5.0.2

RUN \
apk add --no-cache --virtual .deps \
Expand All @@ -19,7 +19,8 @@ RUN \
autoconf \
gcc \
g++ \
git
git \
zlib-dev

RUN \
## Swoole Extension
Expand Down Expand Up @@ -52,7 +53,6 @@ COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/swoole
# Add Source Code
COPY ./src /code/src
COPY ./phpunit.xml /code/
COPY ./psalm.xml /code/


# Enable Extensions
Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint",
"check": "./vendor/bin/phpstan analyse --level 6 src tests"
"check": "./vendor/bin/phpstan analyse --level 6 src tests --memory-limit 512M"
},
"require": {
"php": ">=8.0",
"ext-swoole": "*",
"utopia-php/framework": "0.25.*"
"utopia-php/framework": "0.28.*"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.15.0",
"swoole/ide-helper": "4.8.3",
"swoole/ide-helper": "5.0.2",
"laravel/pint": "1.2.*",
"phpstan/phpstan": "1.9.x-dev"
"phpstan/phpstan": "^1.10"
},
"minimum-stability": "dev"
}
Loading