diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml new file mode 100644 index 0000000..ed1b9d0 --- /dev/null +++ b/.github/workflows/coding-standards.yml @@ -0,0 +1,66 @@ +name: Coding Standards + +on: + push: + branches: + - develop + - stable + - release/** + pull_request: + branches: + - develop + +jobs: + lint: + name: Script and Style Coding Standards + 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 + with: + node-version: 14 + - name: Log debug information + run: | + npm --version + node --version + - name: Install npm dependencies + run: npm ci + - name: Run eslint + run: npm run lint:scripts + - name: Run stylelint + run: npm run lint:styles + - name: Run npmPkgJsonLint + run: npm run lint:pkg + phpcs: + name: PHP Coding Standards + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up PHP version + 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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6b2495b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Travis CI configuration -# @link https://travis-ci.org/ - -os: linux -dist: xenial - -language: generic - -notifications: - email: - on_success: never - on_failure: change - -cache: - apt: true - directories: - - $HOME/.composer/cache - - vendor - - $HOME/.npm - - $HOME/.nvm/.cache - -branches: - only: - - stable - - 0.x - -before_install: - - npm --version - - node --version - - nvm install --latest-npm - -jobs: - include: - - name: Lint JS - install: npm ci - script: npm run lint:scripts - - - name: Lint CSS - install: npm ci - script: npm run lint:styles - - - name: Lint JSON - install: npm ci - script: npm run lint:pkg - - - name: Lint PHP - install: composer install - script: - - find . \( -name '*.php' \) -not -path "./vendor/*" | xargs -n1 bash -c 'php -lf $0 || exit 1' - - npm run lint:php - - - name: Build - install: - - npm ci - - composer install - - npm run build