Skip to content

Commit

Permalink
Merge pull request #19 from Rutam21/APPW-4356
Browse files Browse the repository at this point in the history
Issue-4356: Add Code Linter To utopia-php/websocket
  • Loading branch information
christyjacob4 authored Jul 17, 2023
2 parents a9d74b4 + c851595 commit a58acff
Show file tree
Hide file tree
Showing 11 changed files with 702 additions and 605 deletions.
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

0 comments on commit a58acff

Please sign in to comment.