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

Issue-4356: Add Code Linter To utopia-php/websocket #19

Merged
merged 12 commits into from
Jul 17, 2023
20 changes: 20 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Linter"

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

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

- run: git checkout HEAD^2

- name: Run Linter
run: |
docker run --rm -v $PWD:/app composer sh -c \
"composer install --profile --ignore-platform-reqs && composer lint"
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
language: php

dist: bionic

php: 8.0

notifications:
Expand All @@ -8,7 +11,7 @@ notifications:
before_script:
- sudo apt-get update
- sudo apt-get -y install libc-ares-dev
- pecl install --configureoptions 'enable-sockets="yes" enable-openssl="yes" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="no" enable-swoole-curl="yes" enable-cares="yes"' swoole
- pecl install --configureoptions 'enable-sockets="yes" enable-openssl="yes" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="no" enable-swoole-curl="yes" enable-cares="yes" enable-brotli="yes"' swoole
- composer install --ignore-platform-reqs

script:
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"autoload": {
"psr-4": {"Utopia\\WebSocket\\": "src/WebSocket"}
},
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint"
},
"require": {
"php": ">=8.0"
},
Expand All @@ -20,6 +24,7 @@
"phpunit/phpunit": "^9.5.5",
"vimeo/psalm": "^4.8.1",
"workerman/workerman": "^4.0",
"laravel/pint": "1.2.*",
"phpstan/phpstan": "^1.8"
}
}
Loading