Skip to content

Pj/warning fix (#7) #11

Pj/warning fix (#7)

Pj/warning fix (#7) #11

Workflow file for this run

name: 'main'
on: [ push ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
coverage: none
tools: cs2pr
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Code style with PHP_CodeSniffer
run: |
find . -name "*.php" ! -path '*/vendor/*' -print0 | xargs -0 -n1 -P8 php -l
vendor/squizlabs/php_codesniffer/bin/phpcs --warning-severity=6 --standard=PSR2 --ignore=vendor --extensions=php --report=full .
deploy-docs:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
needs: [ lint ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build Docs
if: github.ref == 'refs/heads/master'
run: |
sudo apt-get install -y doxygen
mkdir docs && cd doc
doxygen Doxyfile
- name: Deploy Docs
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
branch: gh-pages
folder: docs