DEV: Update CI workflows (#192)

Co-authored-by: discoursebuild <build@discourse.org>
This commit is contained in:
discoursebot 2022-11-07 13:32:48 -05:00 committed by GitHub
parent bf1a79c9ad
commit 41a5e0a27a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -20,7 +20,7 @@ jobs:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 16 node-version: 18
cache: yarn cache: yarn
- name: Yarn install - name: Yarn install
@ -33,15 +33,15 @@ jobs:
bundler-cache: true bundler-cache: true
- name: ESLint - name: ESLint
if: ${{ always() }} if: ${{ !cancelled() }}
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets,admin/assets}/javascripts
- name: Prettier - name: Prettier
if: ${{ always() }} if: ${{ !cancelled() }}
shell: bash shell: bash
run: | run: |
yarn prettier -v yarn prettier -v
if [ 0 -lt $(find assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then if [ 0 -lt $(find assets admin/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}" yarn prettier --list-different "assets/**/*.{scss,js,es6}"
fi fi
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
@ -49,9 +49,9 @@ jobs:
fi fi
- name: Ember template lint - name: Ember template lint
if: ${{ always() }} if: ${{ !cancelled() }}
run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts admin/assets/javascripts
- name: Rubocop - name: Rubocop
if: ${{ always() }} if: ${{ !cancelled() }}
run: bundle exec rubocop . run: bundle exec rubocop .