0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 10:40:28 +01:00
discourse-custom-wizard/.github/workflows/plugin-linting.yml

55 Zeilen
1,3 KiB
YAML

name: Linting
on:
push:
branches:
- main
2021-10-05 08:33:27 +02:00
- stable
pull_request:
2022-07-27 16:21:02 +02:00
concurrency:
group: plugin-linting-${{ format('{0}-{1}', github.head_ref || github.run_number, github.job) }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
2022-07-27 16:21:02 +02:00
- uses: actions/checkout@v3
- name: Set up Node.js
2022-07-27 16:21:02 +02:00
uses: actions/setup-node@v3
with:
2022-07-27 16:21:02 +02:00
node-version: 16
cache: yarn
- name: Yarn install
run: yarn install
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
2022-07-27 16:21:02 +02:00
bundler-cache: true
- name: ESLint
2022-07-27 16:21:02 +02:00
if: ${{ always() }}
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts
- name: Prettier
2022-07-27 16:21:02 +02:00
if: ${{ always() }}
shell: bash
run: |
yarn prettier -v
2022-07-27 16:21:02 +02:00
if [ 0 -lt $(find assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
fi
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
yarn prettier --list-different "test/**/*.{js,es6}"
fi
- name: Rubocop
2022-07-27 16:21:02 +02:00
if: ${{ always() }}
2022-06-29 09:55:21 +02:00
run: bundle exec rubocop .