Skip to content

Commit 164850b

Browse files
committed
Switched to Maven-based test server
1 parent 74b16c7 commit 164850b

File tree

4 files changed

+153
-83
lines changed

4 files changed

+153
-83
lines changed

.github/workflows/build.yml

+25-20
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
strategy:
3232
matrix:
3333
os: [ubuntu-latest, windows-latest, macOS-latest]
34+
3435
steps:
3536
- name: Checkout
3637
uses: actions/checkout@v2
@@ -41,34 +42,24 @@ jobs:
4142
dotnet restore
4243
dotnet build --configuration Release --no-restore
4344
44-
test:
45-
# we have to test on Linux in order to use Docker for test server
46-
name: Test against Coherence ${{ matrix.coherence_version }}
45+
test-linux:
46+
name: Test on Linux against Coherence ${{ matrix.coherence_version }}
4747
needs: build
4848
runs-on: ubuntu-latest
4949
strategy:
5050
matrix:
51-
coherence_version: [14.1.1-0-2, 20.06.1]
52-
services:
53-
test-server:
54-
image: docker.pkg.github.com/oracle/coherence-dotnet-extend-client/test-server:${{ matrix.coherence_version }}
55-
credentials:
56-
username: ${{ github.actor }}
57-
password: ${{ secrets.GITHUB_TOKEN }}
58-
ports:
59-
- 9040:9040
60-
- 9042:9042
61-
- 9043:9043
62-
- 9098:9098
63-
- 9099:9099
64-
- 9490:9490
65-
- 9700:9700
66-
- 9800:9800
67-
- 9900:9900
51+
coherence_version: [14.1.1-0-3, 20.12.1, 21.06-SNAPSHOT]
52+
6853
steps:
6954
- name: Checkout
7055
uses: actions/checkout@v2
7156

57+
# Set up Java 11
58+
- name: Set up Java 11
59+
uses: actions/setup-java@v1
60+
with:
61+
java-version: '11'
62+
7263
# Install SSL certificates
7364
- name: Install SSL certificates
7465
run: |
@@ -83,6 +74,20 @@ jobs:
8374
dotnet restore
8475
dotnet build --configuration Release --no-restore
8576
77+
# Build test server
78+
- name: Build test server
79+
run: |
80+
pushd tests/test-server
81+
mvn clean install
82+
popd
83+
84+
# Start test server
85+
- name: Start test server
86+
run: |
87+
pushd tests/test-server
88+
mvn exec:exec &
89+
popd
90+
8691
# Run Tests
8792
- name: Run Tests
8893
run: dotnet test --configuration Release --no-restore

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ BenchmarkDotNet.Artifacts/
127127
project.lock.json
128128
project.fragment.lock.json
129129
artifacts/
130+
.signed/
130131

131132
# StyleCop
132133
StyleCopReport.xml

tests/test-server/.mvn/settings.xml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<!--
2+
~ Copyright (c) 2020 Oracle and/or its affiliates.
3+
~
4+
~ Licensed under the Universal Permissive License v 1.0 as shown at
5+
~ http://oss.oracle.com/licenses/upl.
6+
-->
7+
8+
<settings>
9+
10+
<profiles>
11+
12+
<profile>
13+
<id>default</id>
14+
<repositories>
15+
<repository>
16+
<id>central</id>
17+
<url>https://repo1.maven.org/maven2/</url>
18+
<releases>
19+
<enabled>true</enabled>
20+
</releases>
21+
<snapshots>
22+
<enabled>false</enabled>
23+
</snapshots>
24+
</repository>
25+
<repository>
26+
<id>sonatype-snapshots</id>
27+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
28+
<releases>
29+
<enabled>false</enabled>
30+
</releases>
31+
<snapshots>
32+
<enabled>true</enabled>
33+
</snapshots>
34+
</repository>
35+
<repository>
36+
<id>jcenter.bintray.com</id>
37+
<url>https://jcenter.bintray.com</url>
38+
</repository>
39+
<repository>
40+
<id>jfrog-snapshots</id>
41+
<url>https://oss.jfrog.org/oss-snapshot-local</url>
42+
</repository>
43+
</repositories>
44+
<pluginRepositories>
45+
<pluginRepository>
46+
<id>central</id>
47+
<url>https://repo1.maven.org/maven2/</url>
48+
<releases>
49+
<enabled>true</enabled>
50+
</releases>
51+
<snapshots>
52+
<enabled>false</enabled>
53+
</snapshots>
54+
</pluginRepository>
55+
<pluginRepository>
56+
<id>sonatype-snapshots</id>
57+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
58+
<releases>
59+
<enabled>false</enabled>
60+
</releases>
61+
<snapshots>
62+
<enabled>true</enabled>
63+
</snapshots>
64+
</pluginRepository>
65+
</pluginRepositories>
66+
</profile>
67+
68+
<profile>
69+
<id>ossrh-staging</id>
70+
<repositories>
71+
<repository>
72+
<id>ossrh-staging</id>
73+
<name>OSS Sonatype Staging</name>
74+
<url>https://oss.sonatype.org/content/groups/staging/</url>
75+
<snapshots>
76+
<enabled>false</enabled>
77+
</snapshots>
78+
<releases>
79+
<enabled>true</enabled>
80+
</releases>
81+
</repository>
82+
</repositories>
83+
<pluginRepositories>
84+
<pluginRepository>
85+
<id>ossrh-staging</id>
86+
<name>OSS Sonatype Staging</name>
87+
<url>https://oss.sonatype.org/content/groups/staging/</url>
88+
<snapshots>
89+
<enabled>false</enabled>
90+
</snapshots>
91+
<releases>
92+
<enabled>true</enabled>
93+
</releases>
94+
</pluginRepository>
95+
</pluginRepositories>
96+
</profile>
97+
98+
</profiles>
99+
100+
<activeProfiles>
101+
<activeProfile>default</activeProfile>
102+
<activeProfile>ossrh-staging</activeProfile>
103+
</activeProfiles>
104+
105+
</settings>

tests/test-server/pom.xml

+22-63
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.oracle.coherence.dotnet</groupId>
88
<artifactId>test-server</artifactId>
9-
<version>14.1.1-0-2</version>
9+
<version>${revision}</version>
1010

1111
<name>Coherence.NET Test Server</name>
1212
<description>
@@ -24,9 +24,6 @@
2424

2525
<coherence.groupId>com.oracle.coherence.ce</coherence.groupId>
2626
<coherence.version>${project.version}</coherence.version>
27-
28-
<docker.version>${project.version}</docker.version>
29-
<jib.goal>dockerBuild</jib.goal>
3027
</properties>
3128

3229
<dependencies>
@@ -38,65 +35,27 @@
3835
</dependencies>
3936

4037
<build>
41-
<pluginManagement>
42-
<plugins>
43-
<plugin>
44-
<groupId>org.apache.maven.plugins</groupId>
45-
<artifactId>maven-compiler-plugin</artifactId>
46-
<version>${maven.compiler.version}</version>
47-
</plugin>
48-
</plugins>
49-
</pluginManagement>
38+
<plugins>
39+
<plugin>
40+
<groupId>org.apache.maven.plugins</groupId>
41+
<artifactId>maven-compiler-plugin</artifactId>
42+
<version>${maven.compiler.version}</version>
43+
</plugin>
44+
45+
<plugin>
46+
<groupId>org.codehaus.mojo</groupId>
47+
<artifactId>exec-maven-plugin</artifactId>
48+
<version>3.0.0</version>
49+
<configuration>
50+
<executable>java</executable>
51+
<arguments>
52+
<argument>-classpath</argument>
53+
<classpath/>
54+
<argument>com.tangosol.net.DefaultCacheServer</argument>
55+
</arguments>
56+
</configuration>
57+
</plugin>
58+
</plugins>
5059
</build>
5160

52-
<profiles>
53-
<profile>
54-
<id>docker</id>
55-
<build>
56-
<plugins>
57-
<plugin>
58-
<groupId>com.google.cloud.tools</groupId>
59-
<artifactId>jib-maven-plugin</artifactId>
60-
<version>2.6.0</version>
61-
<configuration>
62-
<from>
63-
<image>
64-
gcr.io/distroless/java:11
65-
</image>
66-
</from>
67-
<to>
68-
<image>coherence/${project.artifactId}</image>
69-
<tags>
70-
<tag>${project.version}</tag>
71-
</tags>
72-
</to>
73-
<container>
74-
<ports>
75-
<port>9040</port>
76-
<port>9042</port>
77-
<port>9043</port>
78-
<port>9098</port>
79-
<port>9099</port>
80-
<port>9490</port>
81-
<port>9700</port>
82-
<port>9800</port>
83-
<port>9900</port>
84-
</ports>
85-
</container>
86-
<containerizingMode>packaged</containerizingMode>
87-
</configuration>
88-
<executions>
89-
<execution>
90-
<goals>
91-
<goal>dockerBuild</goal>
92-
</goals>
93-
<phase>package</phase>
94-
</execution>
95-
</executions>
96-
</plugin>
97-
</plugins>
98-
</build>
99-
</profile>
100-
</profiles>
101-
10261
</project>

0 commit comments

Comments
 (0)