Ohrm5 x 2208 #488
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
name: Lint | |
on: [ push, pull_request ] | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install node dependencies | |
run: cd src/client && yarn install | |
- name: Lint client code | |
run: cd src/client && yarn lint | |
- name: Lint installer client code | |
run: | | |
cd installer/client | |
yarn install | |
yarn lint | |
- name: Lint Cypress tests | |
run: cd src/test/functional && yarn install && yarn lint | |
- name: Install dependencies | |
run: | | |
php8.1 -f /usr/bin/composer install -d src | |
php8.1 -f /usr/bin/composer install -d devTools/core | |
- name: Check PHP Coding Standards | |
run: php devTools/core/console.php php-cs-fix --php php8.1 | |
- name: Check files changed | |
id: git-status | |
run: | | |
git status --porcelain | |
echo "status=$(git status --porcelain)" >> $GITHUB_OUTPUT | |
- name: Fail if files changed | |
if: ${{ steps.git-status.outputs.status }} | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('Files changed with lint fix') | |
- name: Creating diff | |
if: ${{ failure() }} | |
run: | | |
git status | |
git diff > ${{ github.sha }}.diff | |
- name: Generate API doc | |
run: php devTools/core/console.php generate-open-api-doc --throw | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: diff-${{ github.sha }} | |
path: ${{ github.sha }}.diff | |
- name: Upload API doc | |
uses: actions/upload-artifact@v3 | |
with: | |
name: API-doc-${{ github.sha }} | |
path: | | |
build/index.html | |
build/orangehrm-v2.json |