-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow for code checks (#11)
* Add GitHub Actions workflow to checks both php and javascript files * use explicit php version * update composer dependencies & install phpstan --------- Co-authored-by: Ali Kemal Özkan <[email protected]>
- Loading branch information
1 parent
c4017d3
commit 24393bb
Showing
6 changed files
with
2,292 additions
and
1,241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.