diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index f4444f0..68713bb 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -16,53 +16,54 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 - - name: Log debug information - run: | - npm --version - node --version - git --version - - name: Install NodeJS v14 - uses: actions/setup-node@v2 + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: 14 - - name: Log debug information - run: | - npm --version - node --version - - name: Install npm dependencies - run: npm ci - - name: Run eslint + node-version-file: '.nvmrc' + check-latest: true + cache: npm + + - name: Npm install + run: npm install + + - name: Lint JavaScript run: npm run lint:script - - name: Run stylelint + + - name: Lint Styles run: npm run lint:style - - name: Run npmPkgJsonLint + + - name: Lint package.json run: npm run lint:pkg - - name: Run markdownlint + + - name: Lint Docs run: npm run lint:docs + phpcs: name: PHP Coding Standards runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 - - name: Set up PHP version + uses: actions/checkout@v4 + + - name: Set up PHP uses: shivammathur/setup-php@v2 with: php-version: '7.4' coverage: none tools: composer, cs2pr - - name: Log debug information - run: | - php --version - composer --version + - name: Install Composer dependencies uses: ramsey/composer-install@v1 with: composer-options: '--no-progress --no-ansi --no-interaction' + - name: Make Composer packages available globally run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH + - name: Log PHPCS debug information run: phpcs -i + - name: Run PHPCS run: phpcs -q -n --report=checkstyle . | cs2pr