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

Add GitHub Actions workflow for code checks #11

Merged
merged 3 commits into from
Dec 1, 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
42 changes: 42 additions & 0 deletions .github/workflows/php_linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Code Quality

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
laravel-lint:
runs-on: ubuntu-latest

strategy:
matrix:
php: [8.2]

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, zip

- name: Install Composer Dependencies
run: |
composer install --no-interaction --prefer-dist
working-directory: ./Website/htdocs/mpmanager

- name: Run Code sniffer
run: ./vendor/bin/phpcbf --standard=PSR12 --tab-width=4 app/
working-directory: ./Website/htdocs/mpmanager
continue-on-error: true

- name: Run PHPStan
run: ./vendor/bin/phpstan analyze app/Http app/Services --memory-limit=4G --level=1
working-directory: ./Website/htdocs/mpmanager
continue-on-error: true
87 changes: 87 additions & 0 deletions .github/workflows/ui_linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Code Quality

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
setup-node:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.10.0

eslint-js:
needs: setup-node
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.10.0

- name: Install Node.js dependencies
run: npm install
working-directory: ./Website/ui

- name: Run ESLint for JavaScript files
run: npx eslint ./src/**/*.js
working-directory: ./Website/ui
continue-on-error: true

eslint-vue:
needs: setup-node
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.10.0

- name: Install Node.js dependencies
run: npm install
working-directory: ./Website/ui

- name: Run ESLint for Vue files
run: npx eslint ./src/**/*.vue
working-directory: ./Website/ui
continue-on-error: true

build-production:
needs: setup-node
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.10.0

- name: Install Node.js dependencies
run: npm install
working-directory: ./Website/ui

- name: Build npm on production mode
run: npm run production
working-directory: ./Website/ui
2 changes: 1 addition & 1 deletion Docker/DockerfileLaravelDev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8-apache
FROM php:8.2-apache

RUN apt-get update && \
apt-get install -y \
Expand Down
7 changes: 4 additions & 3 deletions Website/htdocs/mpmanager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
"webpatser/laravel-uuid": "^4.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"barryvdh/laravel-debugbar": "^3.5",
"barryvdh/laravel-debugbar": "^3.5",
"beyondcode/laravel-dump-server": "^1.8",
"spatie/laravel-ignition": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^6.1",
"phpstan/phpstan": "^1.1",
"phpunit/phpunit": "^9.0",
"roave/security-advisories": "dev-latest",
"spatie/laravel-ignition": "^1.0",
"spatie/laravel-web-tinker": "^1.7",
"squizlabs/php_codesniffer": "*",
"vimeo/psalm": "^4.4"
Expand Down
Loading
Loading