Skip to content

Commit

Permalink
Merge pull request #20 from MagnaibayarMN/main
Browse files Browse the repository at this point in the history
added laravel/pint & configured as linter and formatter
  • Loading branch information
christyjacob4 authored Oct 14, 2022
2 parents 698a58a + afabebd commit 183aa96
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 149 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"
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
"autoload": {
"psr-4": {"Utopia\\System\\": "src/System"}
},
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint"
},
"require": {
"php": ">=7.4"
"php": ">=7.4",
"laravel/pint": "1.2.*"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
Expand Down
Loading

0 comments on commit 183aa96

Please sign in to comment.