kind: pipeline
name: default
type: docker

steps:
  - name: composer-install
    image: composer:2
    commands:
      - composer install --ignore-platform-req=php
  - name: lint-php
    image: composer:2
    commands:
      - ./vendor/bin/phpcs
    depends_on:
      - composer-install
  - name: node-install
    image: node:14
    commands:
      - npm install
  - name: lint-assets
    image: node:14
    commands:
      - npx eslint scripts/block.js
      - npx eslint scripts/liveticker.js
      - npx stylelint styles/block.css
      - npx stylelint styles/liveticker.css
    depends_on:
      - node-install