Update README.md #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
push: | |
jobs: | |
php-lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP Action | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- run: | | |
composer install --prefer-source --quiet --no-interaction | |
composer test | |
caddy-fmt: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Format caddyfile | |
run: | | |
for CADDYFILE_PATH in **/Caddyfile; do | |
docker run -v $(dirname $(realpath $CADDYFILE_PATH)):/srv caddy \ | |
caddy fmt --diff | |
done | |
etc-lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get yarn cache | |
id: yarn-cache | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Lint | |
run: | | |
yarn --dev | |
yarn run lint |