Skip to content

Commit 91eac94

Browse files
Teodor Ciuraruclaude
andcommitted
Separate build and test jobs for clearer CI structure
- Rename build-and-test job to just 'build' for clarity - Remove unit tests from build job (keep build focused on artifacts) - Fix job dependencies: lint → build → browserstack-test - Build job now only: generates test doc, builds JAR, uploads artifacts - Integration tests run in separate browserstack-test job - Matches cleaner separation of concerns pattern 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 07dee6f commit 91eac94

1 file changed

Lines changed: 5 additions & 22 deletions

File tree

.github/workflows/java-spring-ci.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ jobs:
5555
working-directory: java-spring
5656
run: ./gradlew spotbugsMain
5757

58-
build-and-test:
59-
name: Build and Test
58+
build:
59+
name: Build
6060
runs-on: ubuntu-latest
6161
needs: lint
62-
timeout-minutes: 30
62+
timeout-minutes: 20
6363
outputs:
6464
test_doc_title: ${{ steps.test_doc.outputs.test_doc_title }}
6565

@@ -118,15 +118,6 @@ jobs:
118118
DITTO_ENABLE_CLOUD_SYNC: true
119119
run: ./gradlew bootJar
120120

121-
- name: Run unit tests
122-
working-directory: java-spring
123-
env:
124-
DITTO_APP_ID: ${{ secrets.DITTO_APP_ID }}
125-
DITTO_PLAYGROUND_TOKEN: ${{ secrets.DITTO_PLAYGROUND_TOKEN }}
126-
DITTO_AUTH_URL: ${{ secrets.DITTO_AUTH_URL }}
127-
DITTO_WEBSOCKET_URL: ${{ secrets.DITTO_WEBSOCKET_URL }}
128-
DITTO_ENABLE_CLOUD_SYNC: false # Default to false for local testing
129-
run: ./gradlew test --tests "QuickstartApplicationTests"
130121

131122
- name: Upload JAR artifacts
132123
uses: actions/upload-artifact@v4
@@ -135,18 +126,10 @@ jobs:
135126
path: java-spring/build/libs/quickstart-0.0.1-SNAPSHOT.jar
136127
retention-days: 1
137128

138-
- name: Upload test reports
139-
if: always()
140-
uses: actions/upload-artifact@v4
141-
with:
142-
name: test-reports-${{ github.run_number }}
143-
path: java-spring/build/reports/
144-
retention-days: 1
145-
146129
browserstack-test:
147130
name: BrowserStack Web Testing
148131
runs-on: ubuntu-latest
149-
needs: build-and-test
132+
needs: build
150133
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
151134
timeout-minutes: 45
152135

@@ -209,7 +192,7 @@ jobs:
209192
DITTO_WEBSOCKET_URL: ${{ secrets.DITTO_WEBSOCKET_URL }}
210193
DITTO_ENABLE_CLOUD_SYNC: true
211194
# Pass generated test document title to integration tests
212-
GITHUB_TEST_DOC_ID: ${{ needs.build-and-test.outputs.test_doc_title }}
195+
GITHUB_TEST_DOC_ID: ${{ needs.build.outputs.test_doc_title }}
213196
GITHUB_ACTIONS: true
214197
GITHUB_RUN_ID: ${{ github.run_id }}
215198
run: |

0 commit comments

Comments
 (0)