Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use own get-changed-files action for the path length check #29319

Open
wants to merge 3 commits into
base: 25_1
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion .github/workflows/demos_visual_tests_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,16 @@ jobs:
uses: actions/checkout@v4

- name: Get changed files
id: changed-files
uses: DevExpress/github-actions/get-changed-files@v1
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
paths: 'apps/demos/Demos/**/*'
output: apps/demos/changed-files.json

- name: Save to file
run: |
jq -r '[.files[] | {filename: .path}]' <<< '${{ steps.changed-files.outputs.json }}' > apps/demos/changed-files.json

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ jobs:
- name: Get sources
uses: actions/checkout@v4

# - name: Check all changed files
# run: |
# RESULT=''
# for file in "${{ steps.changed-files.outputs.all_changed_files }}"; do
# if (( ${#file} > $MAX_LENGTH )); then RESULT+="$file\n"; fi;
# done
# if (( ${#RESULT} )); then printf "The following filenames are longer than $MAX_LENGTH characters:\n${RESULT}" && exit 1; fi;
- name: Get changed files
id: changed-files
uses: DevExpress/github-actions/get-changed-files@v1
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check all changed files
run: |
RESULT=''
for file in ${{ steps.changed-files.outputs.files }}; do
if (( ${#file} > $MAX_LENGTH )); then RESULT+="$file\n"; echo "::error file=$file::filename longer than $MAX_LENGTH"; fi;
done
if (( ${#RESULT} )); then printf "The following filenames are longer than $MAX_LENGTH characters:\n${RESULT}" && exit 1; fi;

notify:
runs-on: devextreme-shr2
Expand Down
Loading