2020-09-25 14:06:55 -04:00
|
|
|
name: Linting
|
|
|
|
|
2020-10-09 11:09:41 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- main
|
|
|
|
pull_request:
|
2020-09-25 14:06:55 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-10-09 11:09:41 -04:00
|
|
|
- uses: actions/checkout@v2
|
2020-09-25 14:06:55 -04:00
|
|
|
|
2020-10-09 11:09:41 -04:00
|
|
|
- name: Set up Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12
|
2020-09-25 14:06:55 -04:00
|
|
|
|
2020-10-09 11:09:41 -04:00
|
|
|
- name: Set up ruby
|
2021-02-11 05:42:26 -05:00
|
|
|
uses: ruby/setup-ruby@v1
|
2020-10-09 11:09:41 -04:00
|
|
|
with:
|
|
|
|
ruby-version: 2.7
|
2021-03-18 01:30:04 -04:00
|
|
|
bundler-cache: true
|
2020-09-25 14:06:55 -04:00
|
|
|
|
2020-10-09 11:09:41 -04:00
|
|
|
- name: Yarn install
|
2021-03-18 01:30:04 -04:00
|
|
|
run: yarn install
|
2020-09-25 14:06:55 -04:00
|
|
|
|
2020-10-09 11:09:41 -04:00
|
|
|
- name: ESLint
|
2021-07-02 11:02:39 -04:00
|
|
|
if: ${{ always() }}
|
2021-01-04 15:11:12 -05:00
|
|
|
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts
|
2020-09-25 14:06:55 -04:00
|
|
|
|
2020-10-09 11:09:41 -04:00
|
|
|
- name: Prettier
|
2021-07-02 11:02:39 -04:00
|
|
|
if: ${{ always() }}
|
|
|
|
shell: bash
|
2020-10-09 11:09:41 -04:00
|
|
|
run: |
|
|
|
|
yarn prettier -v
|
2021-07-02 11:02:39 -04:00
|
|
|
shopt -s extglob
|
|
|
|
if ls assets/**/*.@(scss|js|es6) &> /dev/null; then
|
|
|
|
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
|
2020-10-09 15:03:16 -04:00
|
|
|
fi
|
2021-07-02 11:02:39 -04:00
|
|
|
if ls test/**/*.@(js|es6) &> /dev/null; then
|
|
|
|
yarn prettier --list-different "test/**/*.{js,es6}"
|
2021-01-04 15:11:12 -05:00
|
|
|
fi
|
2020-09-25 14:06:55 -04:00
|
|
|
|
2021-02-11 05:42:26 -05:00
|
|
|
- name: Ember template lint
|
2021-07-02 11:02:39 -04:00
|
|
|
if: ${{ always() }}
|
2021-02-11 05:42:26 -05:00
|
|
|
run: yarn ember-template-lint assets/javascripts
|
|
|
|
|
2020-10-09 11:09:41 -04:00
|
|
|
- name: Rubocop
|
2021-07-02 11:02:39 -04:00
|
|
|
if: ${{ always() }}
|
2020-10-09 11:09:41 -04:00
|
|
|
run: bundle exec rubocop .
|