DEV: Run prettier and rubocop in parallel for CI (#17357)

This commit is contained in:
David Taylor 2022-07-07 06:29:14 +01:00 committed by GitHub
parent c32ac45b29
commit 1121062aa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -62,7 +62,7 @@ jobs:
- name: Rubocop
if: ${{ always() }}
run: bundle exec rubocop .
run: bundle exec rubocop --parallel .
- name: ESLint (core)
if: ${{ always() }}
@ -76,7 +76,7 @@ jobs:
if: ${{ always() }}
run: |
yarn prettier -v
yarn prettier --list-different \
yarn pprettier --list-different \
"app/assets/stylesheets/**/*.scss" \
"app/assets/javascripts/**/*.js" \
"plugins/**/assets/stylesheets/**/*.scss" \

View File

@ -44,7 +44,7 @@ end
def run_or_fail_prettier(*patterns)
if patterns.any? { |p| Dir[p].any? }
patterns = patterns.map { |p| "'#{p}'" }.join(' ')
run_or_fail("yarn prettier --list-different #{patterns}")
run_or_fail("yarn pprettier --list-different #{patterns}")
else
puts "Skipping prettier. Pattern not found."
true
@ -84,12 +84,12 @@ task 'docker:test' do
unless ENV["SKIP_CORE"]
puts "Listing prettier offenses in core:"
@good &&= run_or_fail('yarn prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.js"')
@good &&= run_or_fail('yarn pprettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.js"')
end
unless ENV["SKIP_PLUGINS"]
puts "Listing prettier offenses in plugins:"
@good &&= run_or_fail('yarn prettier --list-different "plugins/**/assets/stylesheets/**/*.scss" "plugins/**/assets/javascripts/**/*.{js,es6}"')
@good &&= run_or_fail('yarn pprettier --list-different "plugins/**/assets/stylesheets/**/*.scss" "plugins/**/assets/javascripts/**/*.{js,es6}"')
end
end
end