dsmiley commented on code in PR #1303:
URL: https://github.com/apache/solr/pull/1303#discussion_r1084758269


##########
.github/workflows/solrj-test-crave.yml:
##########
@@ -0,0 +1,41 @@
+name: SolrJ Tests
+
+on:
+  pull_request:
+    branches:
+      - 'main'
+    paths:
+      - '.github/workflows/solrj-test.yml'
+      - 'solr/solrj/**'
+
+jobs:
+  test:
+    name: Run SolrJ Tests
+
+    runs-on: ubuntu-latest
+
+    steps:
+    # Setup
+    - uses: actions/checkout@v2
+    - name: Set up JDK 11
+      uses: actions/setup-java@v2
+      with:
+        distribution: 'temurin'
+        java-version: 11
+        java-package: jdk
+    - name: Grant execute permission for gradlew
+      run: chmod +x gradlew
+    - uses: actions/cache@v2
+      with:
+        path: |
+          ~/.gradle/caches
+        key: ${{ runner.os }}-gradle-solrj-${{ hashFiles('versions.lock') }}
+        restore-keys: |
+          ${{ runner.os }}-gradle-solrj-
+          ${{ runner.os }}-gradle-
+    - name: Get the Crave binary
+      run: curl -s 
https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s 
--
+    - name: Initialize gradle settings
+      run: ./crave run -- ./gradlew localSettings
+    - name: Test the SolrJ Package
+      run: ./crave run -- ./gradlew test

Review Comment:
   The name of this file suggests the tests are specific to SolrJ yet this line 
here will run all tests.  Lets rename this file to `tests-via-crave.yml` or 
something like that.  After all, the point of this is that we'll be able to run 
all tests efficiently, not just one module's tests within Solr.



##########
.github/workflows/solrj-test-crave.yml:
##########
@@ -0,0 +1,41 @@
+name: SolrJ Tests
+
+on:
+  pull_request:
+    branches:
+      - 'main'
+    paths:
+      - '.github/workflows/solrj-test.yml'
+      - 'solr/solrj/**'
+
+jobs:
+  test:
+    name: Run SolrJ Tests
+
+    runs-on: ubuntu-latest
+
+    steps:
+    # Setup
+    - uses: actions/checkout@v2
+    - name: Set up JDK 11
+      uses: actions/setup-java@v2
+      with:
+        distribution: 'temurin'
+        java-version: 11
+        java-package: jdk
+    - name: Grant execute permission for gradlew
+      run: chmod +x gradlew
+    - uses: actions/cache@v2
+      with:
+        path: |
+          ~/.gradle/caches
+        key: ${{ runner.os }}-gradle-solrj-${{ hashFiles('versions.lock') }}
+        restore-keys: |
+          ${{ runner.os }}-gradle-solrj-
+          ${{ runner.os }}-gradle-
+    - name: Get the Crave binary
+      run: curl -s 
https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s 
--
+    - name: Initialize gradle settings
+      run: ./crave run -- ./gradlew localSettings

Review Comment:
   FYI this is going to write a gradle.properties file to the project dir if it 
isn't there; if it is there already, it'll do nothing.    Will this file be 
retained between builds?
   
   The code that generates this gradle.properties has a hard cap on the number 
of CPUs to use at 12.  I could try adding options to the localSettings task to 
not cap it.  If we are okay with hard-coding into this GitHub actions yaml 
script a particular number of test runners based on assuming knowledge of what 
type of machine is going to run it, it'd be an easy work-around.  That would be 
`./gradlew --max-workers=48 test` below.



##########
.github/workflows/solrj-test-crave.yml:
##########
@@ -0,0 +1,41 @@
+name: SolrJ Tests
+
+on:
+  pull_request:
+    branches:
+      - 'main'
+    paths:
+      - '.github/workflows/solrj-test.yml'
+      - 'solr/solrj/**'
+
+jobs:
+  test:
+    name: Run SolrJ Tests

Review Comment:
   ```suggestion
       name: Run Solr Tests using Crave.io resources
   ```



##########
.github/workflows/solrj-test-crave.yml:
##########
@@ -0,0 +1,41 @@
+name: SolrJ Tests

Review Comment:
   ```suggestion
   name: Solr Tests
   ```



##########
.github/workflows/solrj-test-crave.yml:
##########
@@ -0,0 +1,41 @@
+name: SolrJ Tests
+
+on:
+  pull_request:
+    branches:
+      - 'main'
+    paths:
+      - '.github/workflows/solrj-test.yml'
+      - 'solr/solrj/**'

Review Comment:
   ```suggestion
   ```
   Lets run all tests



##########
.github/workflows/solrj-test-crave.yml:
##########
@@ -0,0 +1,41 @@
+name: SolrJ Tests
+
+on:
+  pull_request:
+    branches:
+      - 'main'
+    paths:
+      - '.github/workflows/solrj-test.yml'
+      - 'solr/solrj/**'
+
+jobs:
+  test:
+    name: Run SolrJ Tests
+
+    runs-on: ubuntu-latest
+
+    steps:
+    # Setup
+    - uses: actions/checkout@v2
+    - name: Set up JDK 11
+      uses: actions/setup-java@v2
+      with:
+        distribution: 'temurin'
+        java-version: 11
+        java-package: jdk
+    - name: Grant execute permission for gradlew
+      run: chmod +x gradlew
+    - uses: actions/cache@v2
+      with:
+        path: |
+          ~/.gradle/caches
+        key: ${{ runner.os }}-gradle-solrj-${{ hashFiles('versions.lock') }}
+        restore-keys: |
+          ${{ runner.os }}-gradle-solrj-
+          ${{ runner.os }}-gradle-
+    - name: Get the Crave binary
+      run: curl -s 
https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s 
--
+    - name: Initialize gradle settings
+      run: ./crave run -- ./gradlew localSettings

Review Comment:
   There are other CLI options that may be useful as well like disabling the 
gradle daemon



-- 
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