Merge pull request #224 from nextcloud/techdebt/noid/validate-infoxml-with-workflow

Validate the info.xml with a github workflow
This commit is contained in:
Joas Schilling 2020-07-10 17:46:15 +02:00 committed by GitHub
commit e3f5c628e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 30 deletions

View File

@ -43,3 +43,16 @@ jobs:
run: composer i
- name: Run coding standards check
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
xml-linters:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Download schema
run: wget https://apps.nextcloud.com/schema/apps/info.xsd
- name: Lint info.xml
uses: ChristophWurst/xmllint-action@v1
with:
xml-file: ./appinfo/info.xml
xml-schema-file: ./info.xsd

View File

@ -57,12 +57,6 @@ install:
- . ${BUILD_APP_MODULE_DIR}/tests/scripts/core-setup.sh
script:
# Check info.xml schema validity
- . ${BUILD_APP_MODULE_DIR}/tests/scripts/lint-appinfo.sh
# Check PHP syntax errors
- . ${BUILD_APP_MODULE_DIR}/tests/scripts/lint-php.sh
# Run app code checker but do not fail, as we have to use private API for now
- . ${BUILD_APP_MODULE_DIR}/tests/scripts/app-check-code.sh || true

View File

@ -1,13 +0,0 @@
#!/usr/bin/env bash
echo "travis_fold:start:lint.appinfo"
set -e
cd ${BUILD_APP_MODULE_DIR}
wget -nv https://apps.nextcloud.com/schema/apps/info.xsd
xmllint appinfo/info.xml --schema info.xsd --noout
rm info.xsd
echo "travis_fold:end:lint.appinfo"

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
echo "travis_fold:start:lint.php"
set -e
cd ${BUILD_APP_MODULE_DIR}
find . -name '*.php' -type f -not -path './vendor/*' -print0 | xargs --no-run-if-empty -0 -n1 -P8 php -l -d display_errors -d display_startup_errors 1>/dev/null
echo "travis_fold:end:lint.php"