shaarli-plugin-shaargem/.forgejo/workflows/lint.yml
2024-10-03 22:52:32 +02:00

34 lines
1.3 KiB
YAML

---
name: lint
run-name: lint is launched by ${{ github.actor }}
on: [push]
jobs:
check:
runs-on: ubuntu-latest
name: lint
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Forgejo!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- name: Lint Markdown files
uses: actions/markdownlint-cli2-action@v17
with:
globs: |
**/*.md
!vendor/*.md
- name: Install linters using Composer
run: |
export COMPOSER_HOME=/tmp
echo "{}" > composer.json
composer config --no-interaction allow-plugins.bamarni/composer-bin-plugin true
composer require --dev bamarni/composer-bin-plugin
composer bin phplint require --dev overtrue/phplint
composer require --dev friendsofphp/php-cs-fixer
- name: Lint PHP files
run: vendor/bin/phplint --no-cache --no-progress --exclude=vendor --verbose
- name: PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --verbose --diff .
- run: echo "🍏 This job's status is ${{ job.status }}."