mirror of https://github.com/FreshRSS/FreshRSS.git
54 lines
1.7 KiB
YAML
54 lines
1.7 KiB
YAML
language: php
|
|
|
|
jobs:
|
|
fast_finish: true
|
|
allow_failures:
|
|
- name: "Translations"
|
|
|
|
include:
|
|
- name: "PHP 8.0 Syntax, linter and tests"
|
|
php: "8.0"
|
|
install:
|
|
- composer global require squizlabs/php_codesniffer
|
|
- composer global require phpunit/phpunit ^9
|
|
script:
|
|
- phpenv rehash
|
|
- find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
|
|
- if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
|
|
- COMPOSER_BIN=$(composer global config --absolute bin-dir)
|
|
- $COMPOSER_BIN/phpunit --bootstrap ./tests/bootstrap.php --verbose ./tests
|
|
- $COMPOSER_BIN/phpcs . -p -s
|
|
- name: "PHP 7.0 Syntax"
|
|
php: "7.0"
|
|
script:
|
|
- phpenv rehash
|
|
- find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
|
|
- if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
|
|
|
|
- name: "Translations format"
|
|
php: "7.4"
|
|
script:
|
|
- phpenv rehash
|
|
- php cli/manipulate.translation.php -a format
|
|
- git diff --exit-code
|
|
|
|
- name: "Translations"
|
|
php: "7.4"
|
|
script:
|
|
- phpenv rehash
|
|
- php cli/check.translation.php -r
|
|
|
|
- name: "Linter JS, CSS, SCSS, Shell and Docker"
|
|
language: node_js
|
|
node_js:
|
|
- "node"
|
|
env:
|
|
- HADOLINT="$HOME/hadolint"
|
|
install:
|
|
- npm install
|
|
- curl -sL -o ${HADOLINT} "https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-$(uname -s)-$(uname -m)" && chmod 700 ${HADOLINT}
|
|
script:
|
|
- npm test
|
|
- bash tests/shellchecks.sh
|
|
- git ls-files --exclude='*Dockerfile*' --ignored | xargs --max-lines=1 "$HADOLINT"
|