EnricoMi commented on code in PR #1532:
URL: 
https://github.com/apache/incubator-uniffle/pull/1532#discussion_r1496964931


##########
.github/workflows/compose.yml:
##########
@@ -0,0 +1,152 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: Docker compose example
+
+on:
+  workflow_call:
+    inputs:
+      java-version:
+        default: '8'
+        required: false
+        type: string
+      jdk-distro:
+        default: 'temurin'
+        required: false
+        type: string
+  workflow_dispatch:
+    inputs:
+      java-version:
+        default: '8'
+        required: false
+        type: string
+      jdk-distro:
+        default: 'temurin'
+        required: false
+        type: string
+
+jobs:
+  compose:
+    runs-on: ubuntu-20.04
+    name: speculate fail tasks
+    steps:
+    - name: Checkout project
+      uses: actions/checkout@v3
+    - name: Set up JDK ${{ inputs.java-version }}
+      uses: actions/setup-java@v3
+      with:
+        java-version: ${{ inputs.java-version }}
+        distribution: ${{ inputs.jdk-distro }}
+    - name: Cache local Maven repository
+      uses: actions/cache@v3
+      with:
+        path: ~/.m2/repository
+        key: mvn-${{ inputs.java-version }}-compose-${{ 
hashFiles('**/pom.xml') }}
+        restore-keys: |
+          mvn-${{ inputs.java-version }}-compose-
+    - name: Build the docker images
+      id: up
+      run: ./deploy/docker-compose/build.sh
+      shell: bash
+    - name: Start the docker cluster
+      run: docker compose -f deploy/docker-compose/docker-compose.yml up 
--detach && sleep 10
+      shell: bash
+    - name: Scale the docker cluster
+      run: docker compose -f deploy/docker-compose/docker-compose.yml scale 
shuffle-server=4 spark-worker=5
+      shell: bash
+    - name: Prepare example Spark app
+      run: |
+        cat << EOL > example.scala

Review Comment:
   This way the CI is self-contained, it does not depend on a file somewhere 
outside `.github`, and you can directly see and edit the code that it executes. 
This code is different to what is given in the README.md because it is a bit 
more complex.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to