2021-04-16 10:07:32 +02:00
|
|
|
name: Linting
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- main
|
2021-10-05 08:33:27 +02:00
|
|
|
- stable
|
2021-04-16 10:07:32 +02:00
|
|
|
pull_request:
|
2021-06-08 12:40:00 +02:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
2021-04-16 10:07:32 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2021-12-22 09:49:24 +01:00
|
|
|
node-version: 14
|
2021-04-16 10:07:32 +02:00
|
|
|
|
|
|
|
- name: Set up ruby
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 2.7
|
|
|
|
|
|
|
|
- name: Setup bundler
|
|
|
|
run: gem install bundler -v 2.1.4 --no-doc
|
|
|
|
|
|
|
|
- name: Setup gems
|
|
|
|
run: bundle install --jobs 4
|
|
|
|
|
|
|
|
- name: Yarn install
|
|
|
|
run: yarn install --dev
|
|
|
|
|
|
|
|
- name: ESLint
|
2022-06-29 09:55:21 +02:00
|
|
|
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts/{discourse,wizard}
|
2021-04-16 10:07:32 +02:00
|
|
|
|
|
|
|
- name: Prettier
|
|
|
|
run: |
|
|
|
|
yarn prettier -v
|
|
|
|
if [ -d "assets" ]; then \
|
2022-06-29 09:55:21 +02:00
|
|
|
yarn prettier --list-different "assets/javascripts/{discourse,wizard}/**/*.{scss,js,es6}" ; \
|
2021-04-16 10:07:32 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Ember template lint
|
|
|
|
run: yarn ember-template-lint assets/javascripts
|
|
|
|
|
|
|
|
- name: Rubocop
|
2022-06-29 09:55:21 +02:00
|
|
|
run: bundle exec rubocop .
|