From 7e303db1f5e45d95fa6c1a8f3aa7327618152fcf Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:55:57 +0300 Subject: [PATCH] Update check.yml --- .github/workflows/check.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5adc97e6..a8d8f70c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -17,19 +17,26 @@ jobs: id: files with: since_last_remote_commit: true - files: | - tests/**/*.{js,ts} - scripts/**/*.{js,ts} - sites/**/*.{js,ts} + files_yaml: | + js: + - tests/**/*.{js,ts} + - scripts/**/*.{js,ts} + - sites/**/*.{js,ts} + channels: + - sites/**/*.channels.xml - uses: actions/setup-node@v4 - if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }} + if: ${{ !env.ACT && (steps.files.outputs.js_any_changed == 'true' || steps.files.outputs.channels_any_changed == 'true') }} with: node-version: 22 cache: 'npm' - name: install dependencies - if: steps.files.outputs.any_changed == 'true' - run: npm install - - name: check changed files - if: steps.files.outputs.any_changed == 'true' + if: steps.files.outputs.js_any_changed == 'true' || steps.files.outputs.channels_any_changed == 'true' + run: SKIP_POSTINSTALL=1 npm install + - name: check changed js-files + if: steps.files.outputs.js_any_changed == 'true' run: | - npx eslint ${{ steps.files.outputs.all_changed_files }} \ No newline at end of file + npx eslint ${{ steps.files.outputs.js_all_changed_files }} + - name: check changed *.channels.xml + if: steps.files.outputs.channels_any_changed == 'true' + run: | + npm run channels:lint -- ${{ steps.files.outputs.channels_all_changed_files }} \ No newline at end of file