mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
This ensures that all our automated tests are using the same version. I'm not sure it matters what version Prettier runs on, but thought it should be the same. This is a down-grade, but it's better to match the version in production. The next step will be to upgrade again for production.
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Linters
|
|
on: [push, pull_request]
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
jobs:
|
|
rubocop:
|
|
name: runner / rubocop
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v1
|
|
- uses: ruby/setup-ruby@v1
|
|
- name: rubocop
|
|
uses: reviewdog/action-rubocop@v2
|
|
with:
|
|
rubocop_version: gemfile
|
|
rubocop_extensions: rubocop-rails:gemfile
|
|
reporter: github-pr-check
|
|
level: error
|
|
fail_on_error: true
|
|
prettier:
|
|
name: runner / prettier
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: .node-version
|
|
|
|
- name: Install JS dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: prettier
|
|
uses: EPMatt/reviewdog-action-prettier@v1
|
|
with:
|
|
github_token: ${{ secrets.github_token }}
|
|
reporter: github-pr-check
|
|
level: error
|
|
fail_on_error: true
|