You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

74 lines
2.0 KiB

name: Lint
on:
push:
branches:
- master
- stable*
pull_request:
jobs:
lint-js:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
- 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@v2
- name: Setup xmllint
run: |
sudo apt update
sudo apt install --no-install-recommends -y libxml2-utils
- name: Setup xmllint problem matcher
uses: korelstar/xmllint-problem-matcher@master
- name: lint XML
run: make lint-xml
lint-php:
runs-on: ubuntu-latest
strategy:
matrix:
version: [min, max]
fail-fast: false
env:
NC_API_TAG: 'dev-master'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Determine PHP version
env:
VERSION_MINMAX: ${{ matrix.version }}
run: echo "PHP_VERSION=$(php tests/nextcloud-version.php --php-$VERSION_MINMAX)" >> $GITHUB_ENV
- name: Set up PHP ${{ env.PHP_VERSION }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
- name: Determine minimum Nextcloud API version
if: matrix.version == 'min'
run: echo "NC_API_TAG=$(php tests/nextcloud-version.php --appinfo)" >> $GITHUB_ENV
- name: Install Dependencies
run: |
composer require --dev christophwurst/nextcloud:$NC_API_TAG
composer install --prefer-dist
- name: Load problem matcher for php -l
uses: korelstar/phplint-problem-matcher@master
- name: lint PHP
run: make -k lint-php