-
Notifications
You must be signed in to change notification settings - Fork 135
79 lines (74 loc) · 2.14 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Lint
on:
push:
branches:
- main
- stable*
pull_request:
permissions:
contents: read
jobs:
lint-js:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
- 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@b4ffde65f46336ab88eb53be808477a3936bae11
- 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@b4ffde65f46336ab88eb53be808477a3936bae11
- 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=dev-stable$(php tests/nextcloud-version.php --appinfo)" >> $GITHUB_ENV
- name: Install Dependencies
run: |
composer require --dev nextcloud/ocp:$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