diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-01-05 07:45:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 13:45:21 +0100 |
commit | a29cd2cdc242de560700f3df7e57b2867f45486e (patch) | |
tree | dbc646c837da9b474a31f53612e72c3b829fb5c6 /.github/workflows | |
parent | 8cff96d94d03b8abbd43c8ac221004d2553b8f15 (diff) |
Move Prettier CI checks to filtered jobs (#22376)
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/lint-json.yml | 38 | ||||
-rw-r--r-- | .github/workflows/lint-yml.yml | 40 | ||||
-rw-r--r-- | .github/workflows/linter.yml | 2 |
3 files changed, 78 insertions, 2 deletions
diff --git a/.github/workflows/lint-json.yml b/.github/workflows/lint-json.yml new file mode 100644 index 000000000..5bf4349b3 --- /dev/null +++ b/.github/workflows/lint-json.yml @@ -0,0 +1,38 @@ +name: JSON Linting +on: + push: + branches-ignore: + - 'dependabot/**' + paths: + - 'package.json' + - 'yarn.lock' + - '.prettier*' + - '**/*.json' + - '.github/workflows/lint-json.yml' + + pull_request: + paths: + - 'package.json' + - 'yarn.lock' + - '.prettier*' + - '**/*.json' + - '.github/workflows/lint-json.yml' + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + cache: yarn + + - name: Install all yarn packages + run: yarn --frozen-lockfile + + - name: Prettier + run: yarn prettier --check "**/*.json" diff --git a/.github/workflows/lint-yml.yml b/.github/workflows/lint-yml.yml new file mode 100644 index 000000000..b939ec8ce --- /dev/null +++ b/.github/workflows/lint-yml.yml @@ -0,0 +1,40 @@ +name: YML Linting +on: + push: + branches-ignore: + - 'dependabot/**' + paths: + - 'package.json' + - 'yarn.lock' + - '.prettier*' + - '**/*.yaml' + - '**/*.yml' + - '.github/workflows/lint-yml.yml' + + pull_request: + paths: + - 'package.json' + - 'yarn.lock' + - '.prettier*' + - '**/*.yaml' + - '**/*.yml' + - '.github/workflows/lint-yml.yml' + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + cache: yarn + + - name: Install all yarn packages + run: yarn --frozen-lockfile + + - name: Prettier + run: yarn prettier --check "**/*.{yml,yaml}" diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 319152e93..b6438d665 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -57,8 +57,6 @@ jobs: cache: yarn - name: Install dependencies run: yarn install --frozen-lockfile - - name: Check prettier formatting - run: yarn format-check - name: Set-up RuboCop Problem Mathcher uses: r7kamura/rubocop-problem-matchers-action@v1 - name: Set-up Stylelint Problem Matcher |