2020-02-02 08:04:37 +01:00
|
|
|
name: Lint
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint-js:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
- name: Set up Stylelint Problem Matcher
|
|
|
|
uses: xt0rted/stylelint-problem-matcher@v1
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: lint JavaScript
|
|
|
|
run: make lint-js
|
|
|
|
- name: lint Stylesheets
|
|
|
|
run: make lint-css
|
|
|
|
- name: build JavaScript
|
|
|
|
run: make build-js-production
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
|
|
|
|
lint-xml:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup xmllint
|
|
|
|
run: sudo apt-get install --no-install-recommends -y libxml2-utils
|
2020-02-13 12:44:56 +01:00
|
|
|
- name: Setup xmllint problem matcher
|
|
|
|
uses: korelstar/xmllint-problem-matcher@master
|
2020-02-02 08:04:37 +01:00
|
|
|
- name: lint XML
|
|
|
|
run: make lint-xml
|
|
|
|
|
|
|
|
lint-php:
|
|
|
|
runs-on: ubuntu-latest
|
2020-02-13 15:22:52 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
version: [min, max]
|
|
|
|
include:
|
|
|
|
- version: min
|
|
|
|
php-version: 7.0
|
|
|
|
- version: max
|
|
|
|
php-version: 7.4
|
2020-02-02 08:04:37 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Set up php${{ matrix.php-versions }}
|
2020-02-13 15:22:52 +01:00
|
|
|
uses: shivammathur/setup-php@v1
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-version }}
|
2020-02-02 08:04:37 +01:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: composer install --prefer-dist
|
2020-02-13 15:22:52 +01:00
|
|
|
- name: Install latest Nextcloud API (dev-master)
|
|
|
|
if: matrix.version == 'max'
|
|
|
|
run: composer require --dev christophwurst/nextcloud:dev-master
|
2020-02-02 08:04:37 +01:00
|
|
|
- name: lint PHP
|
|
|
|
run: make lint-php
|