File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 push :
2525 paths :
2626 # List paths for which changes should trigger this workflow:
27- - ' lib/**/'
27+ - ' lib/**/bin/**'
28+ - ' lib/**/data/**'
29+ - ' lib/**/etc/**'
30+ - ' lib/**/include/**'
31+ - ' lib/**/lib/**'
32+ - ' lib/**/src/**'
33+ - ' lib/**/test/**'
34+
35+ - ' lib/**/*.gyp'
36+ - ' lib/**/*.gypi'
37+ - ' lib/**/manifest.json'
38+
39+ - ' package.json'
40+
41+ # List paths for which changes should *not* trigger this workflow:
42+ - ' !lib/**/_tools/**'
2843
2944# Workflow jobs:
3045jobs :
8398 # Run JavaScript tests:
8499 - name : ' Run JavaScript tests'
85100 run : |
86- directories="${{ steps.changed-directories.outputs.all_changed_files }}"
87- echo "Changed directories: $directories"
88- timeout-minutes : 5
101+ all_changed="${{ steps.changed-directories.outputs.all_changed_files }}"
89102
103+ # Find unique package directories:
104+ directories=$(echo "${directories}" | tr ' ' '\n' | sed -E 's/\/(bin|data|etc|include|lib|src|test)\/?$//' | uniq)
105+
106+ # Find all test files in changed packages:
107+ files=$(find ${directories} -wholename '**/test/test*.js' | grep -v '/fixtures/' | tr '\n' ' ')
108+
109+ # Exclude files residing in test fixtures directories:
110+ files=$(echo "${files}" | grep -v '/fixtures/')
111+
112+ if [[ -n "${file}" ]]; then
113+ make test-javascript-files FILES="${files}"
114+ fi
115+ timeout-minutes : 15
You can’t perform that action at this time.
0 commit comments