Skip to content

Commit 113a1b9

Browse files
committed
Try what works in the docs repo?
1 parent 851526b commit 113a1b9

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/run-java-spring-boot-tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ jobs:
3232
run: chmod +x mvnw
3333

3434
- name: Run unit tests
35-
run: ./mvnw test -DMONGODB_URI="${{ secrets.MFLIX_URI }}"
35+
run: ./mvnw test
36+
env:
37+
MONGODB_URI: ${{ secrets.MFLIX_URI }}
3638

3739
- name: Run integration tests
38-
run: ./mvnw test -Dtest=MongoDBSearchIntegrationTest -DMONGODB_URI="${{ secrets.MFLIX_URI }}" -DENABLE_SEARCH_TESTS=true
40+
run: ./mvnw test -Dtest=MongoDBSearchIntegrationTest
41+
env:
42+
MONGODB_URI: ${{ secrets.MFLIX_URI }}
43+
ENABLE_SEARCH_TESTS: true
3944
continue-on-error: true
4045

4146
- name: Upload test results

server/java-spring/pom.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
<impsort.plugin.version>1.12.0</impsort.plugin.version>
2727
<byte-buddy.version>1.17.8</byte-buddy.version>
2828
<langchain4j.version>1.0.0-beta3</langchain4j.version>
29+
<!--suppress UnresolvedMavenProperty -->
30+
<mongodb.uri>${env.MONGODB_URI}</mongodb.uri>
31+
<!--suppress UnresolvedMavenProperty -->
32+
<enable.search.tests>${env.ENABLE_SEARCH_TESTS}</enable.search.tests>
2933
</properties>
3034

3135
<dependencies>
@@ -138,10 +142,10 @@
138142
-javaagent:${settings.localRepository}/net/bytebuddy/byte-buddy-agent/${byte-buddy.version}/byte-buddy-agent-${byte-buddy.version}.jar
139143
-Xshare:off
140144
</argLine>
141-
<!-- Pass system properties as environment variables to test JVM -->
145+
<!-- Pass Maven properties as environment variables to test JVM -->
142146
<environmentVariables>
143-
<MONGODB_URI>${MONGODB_URI}</MONGODB_URI>
144-
<ENABLE_SEARCH_TESTS>${ENABLE_SEARCH_TESTS}</ENABLE_SEARCH_TESTS>
147+
<MONGODB_URI>${mongodb.uri}</MONGODB_URI>
148+
<ENABLE_SEARCH_TESTS>${enable.search.tests}</ENABLE_SEARCH_TESTS>
145149
</environmentVariables>
146150
</configuration>
147151
</plugin>

0 commit comments

Comments
 (0)