Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 44 additions & 14 deletions .github/workflows/demos_visual_tests_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ jobs:

get-changes:
runs-on: ubuntu-22.04
if: github.event_name == 'pull_request'
name: Get changed demos
timeout-minutes: 5

Expand Down Expand Up @@ -256,6 +257,7 @@ jobs:
uses: actions/checkout@v4

- name: Download artifacts
if: github.event_name == 'pull_request'
uses: actions/download-artifact@v4
with:
name: changed-demos
Expand Down Expand Up @@ -325,13 +327,52 @@ jobs:
pnpm run lint-demos
fi

- name: Run lint on changed demos
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
working-directory: apps/demos
env:
DEBUG: 'eslint:cli-engine,stylelint:standalone'
run: |
pnpx nx lint-non-demos

if [ -f "changed-files.json" ]; then
echo "Running lint-demos on changed files"
CHANGED_DEMOS=$(jq -r '.[].filename' changed-files.json | grep '^apps/demos/Demos/' | sed 's|^apps/demos/||' | tr '\n' ' ')
if [ ! -z "$CHANGED_DEMOS" ]; then
echo "Changed demo files: $CHANGED_DEMOS"
pnpx eslint $CHANGED_DEMOS
else
echo "No demo files changed, skipping lint-demos"
fi
else
echo "changed-files.json not found"
pnpm run lint-demos
fi

- name: Run lint on changed demos
if: github.event_name != 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
working-directory: apps/demos
env:
DEBUG: 'eslint:cli-engine,stylelint:standalone'
run: |
pnpx nx lint-non-demos

if [ -f "changed-files.json" ]; then
echo "Running lint-demos on changed files"
CHANGED_DEMOS=$(jq -r '.[].filename' changed-files.json | grep '^apps/demos/Demos/' | sed 's|^apps/demos/||' | tr '\n' ' ')
if [ ! -z "$CHANGED_DEMOS" ]; then
echo "Changed demo files: $CHANGED_DEMOS"
pnpx eslint $CHANGED_DEMOS
else
echo "No demo files changed, skipping lint-demos"
fi

check_generated_demos:
name: ${{ matrix.name }}
runs-on: ubuntu-22.04
timeout-minutes: 10
needs:
- build-devextreme
- get-changes

strategy:
fail-fast: false
Expand All @@ -345,6 +386,7 @@ jobs:
uses: actions/checkout@v4

- name: Download artifacts
if: github.event_name == 'pull_request'
uses: actions/download-artifact@v4
with:
name: changed-demos
Expand Down Expand Up @@ -376,12 +418,6 @@ jobs:
working-directory: apps/demos
run: pnpm run prepare-js

- name: Download changed demos info
uses: actions/download-artifact@v4
with:
name: changed-demos
path: apps/demos

- name: Check generated JS demos
working-directory: apps/demos
run: |
Expand Down Expand Up @@ -420,7 +456,7 @@ jobs:

testcafe:
needs: build-demos
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')
if: contains(github.event.pull_request.labels.*.name, 'force all tests')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -451,12 +487,6 @@ jobs:
with:
name: devextreme-sources

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: changed-demos
path: apps/demos

- uses: pnpm/action-setup@v4
with:
run_install: false
Expand Down
Loading