Skip to content

[stable2.2] fix: add preview enhancement job to new accounts joblist #9161

[stable2.2] fix: add preview enhancement job to new accounts joblist

[stable2.2] fix: add preview enhancement job to new accounts joblist #9161

Workflow file for this run

name: Lint
on: pull_request
permissions:
contents: read
jobs:
xml-linters:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download schema
run: wget https://apps.nextcloud.com/schema/apps/info.xsd
- name: Lint info.xml
uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1
with:
xml-file: ./appinfo/info.xml
xml-schema-file: ./info.xsd
php-linters:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2']
name: php${{ matrix.php-versions }} lint
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: composer run lint
php-cs-fixer:
name: php-cs check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer i
- name: Run coding standards check
run: composer run cs:check
node-linters:
runs-on: ubuntu-latest
name: ESLint
steps:
- uses: actions/checkout@v3
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.2
id: versions
with:
fallbackNode: '^14'
fallbackNpm: '^7'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
- name: npm install
run: npm ci
- name: eslint
run: npm run lint
env:
CI: true
summary:
runs-on: ubuntu-latest
needs:
- xml-linters
- php-linters
- php-cs-fixer
- node-linters
if: always()
name: lint-summary
steps:
- name: XML linter status
run: if ${{ needs.xml-linters.result != 'success' && needs.xml-linters.result != 'skipped' }}; then exit 1; fi
- name: PHP linter status
run: if ${{ needs.php-linters.result != 'success' && needs.php-linters.result != 'skipped' }}; then exit 1; fi
- name: PHP cs fixer status
run: if ${{ needs.php-cs-fixer.result != 'success' && needs.php-cs-fixer.result != 'skipped' }}; then exit 1; fi
- name: Node linter status
run: if ${{ needs.node-linters.result != 'success' && needs.node-linters.result != 'skipped' }}; then exit 1; fi