Skip to content

Commit ee82a80

Browse files
committed
Skip UI tests when no ui change
fix
1 parent 16e642e commit ee82a80

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/tests.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
# Set job outputs to values from filter step
2222
outputs:
2323
codechange: ${{ steps.filter.outputs.codechange }}
24+
uichange: ${{ steps.filter.outputs.uichange }}
2425
steps:
2526
# For pull requests it's not necessary to checkout the code
2627
- uses: dorny/paths-filter@v2
@@ -29,6 +30,12 @@ jobs:
2930
filters: |
3031
codechange:
3132
- '!presto-docs/**'
33+
- uses: dorny/paths-filter@v2
34+
id: ui_filter
35+
with:
36+
filters: |
37+
uichange:
38+
- 'presto-ui/**'
3239
3340
test:
3441
runs-on: ubuntu-latest
@@ -46,7 +53,7 @@ jobs:
4653
- ":presto-tests -P ci-only-distributed-queries"
4754
- ":presto-tests -P ci-only-aggregation-queries"
4855
- ":presto-tests -P ci-only-plan-determinism"
49-
- ":presto-tests -P ci-only-resource-manager"
56+
- ":presto-tests -P ci-only-resource-manager"
5057
- ":presto-accumulo"
5158
- ":presto-cassandra -P test-cassandra-integration-smoke-test"
5259
- ":presto-hive"
@@ -89,8 +96,19 @@ jobs:
8996
- name: Maven Install
9097
if: needs.changes.outputs.codechange == 'true'
9198
run: |
92-
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
99+
if [ "${{ needs.changes.outputs.uichange }}" != "true" ]; then
100+
EXTRA_ARGS="-DskipUI"
101+
else
102+
EXTRA_ARGS=""
103+
fi
104+
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS} ${EXTRA_ARGS}"
93105
./mvnw install ${MAVEN_FAST_INSTALL} -am -pl $(echo '${{ matrix.modules }}' | cut -d' ' -f1)
94106
- name: Maven Tests
95107
if: needs.changes.outputs.codechange == 'true'
96-
run: ./mvnw test ${MAVEN_TEST} -pl ${{ matrix.modules }}
108+
run: |
109+
if [ "${{ needs.changes.outputs.uichange }}" != "true" ]; then
110+
EXTRA_ARGS="-DskipUI"
111+
else
112+
EXTRA_ARGS=""
113+
fi
114+
./mvnw test ${MAVEN_TEST} ${EXTRA_ARGS} -pl ${{ matrix.modules }}

0 commit comments

Comments
 (0)