Skip to content

Commit 684fc50

Browse files
authored
Merge pull request #28 from anystub/stub-naming
bump version
2 parents bee0fa0 + ad71b16 commit 684fc50

File tree

4 files changed

+61
-51
lines changed

4 files changed

+61
-51
lines changed

.github/workflows/maven.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,17 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v3
1919

20-
- name: Set up JDK 11
20+
- name: Set up JDK 17
2121
uses: actions/setup-java@v3
2222
with:
2323
java-version: '17'
2424
distribution: 'temurin'
25-
server-id: SERVER_ID
25+
server-id: central
2626
server-username: SERVER_USERNAME
2727
server-password: SERVER_PASSWORD
2828
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2929
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3030

31-
- name: Cache SonarCloud packages
32-
uses: actions/cache@v1
33-
with:
34-
path: ~/.sonar/cache
35-
key: ${{ runner.os }}-sonar
36-
restore-keys: ${{ runner.os }}-sonar
3731
- name: Cache Maven packages
3832
uses: actions/cache@v1
3933
with:
@@ -45,31 +39,28 @@ jobs:
4539
if: ${{ github.ref != 'refs/heads/main' }}
4640
env:
4741
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4942
SERVER_USERNAME: ${{ secrets.MAVEN_USERNAME }}
5043
SERVER_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
5144
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
5245
run: |
53-
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=anystub_anystub-reactive
46+
mvn -B verify
5447
5548
- name: Prep-Release with Maven
5649
if: ${{ github.ref == 'refs/heads/main' }}
5750
env:
5851
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6052
MAVEN_USERNAME: ${{ secrets.GH_USERNAME }}
6153
MAVEN_CENTRAL_TOKEN: ${{ secrets.GH_PASSWORD }}
6254
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
6355
run: |
6456
git config --global user.email "[email protected]"
6557
git config --global user.name "AUTO-COMMIT"
66-
mvn -B release:prepare -DscmCommentPrefix="[skip ci]" -Darguments='-Dgpg.skip=false' org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=anystub_anystub-reactive
58+
mvn -B release:prepare -DscmCommentPrefix="[skip ci]" -Darguments='-Dgpg.skip=false'
6759
6860
- name: Release with Maven
6961
if: ${{ github.ref == 'refs/heads/main' }}
7062
env:
7163
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7364
SERVER_USERNAME: ${{ secrets.MAVEN_USERNAME }}
7465
SERVER_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
7566
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

.sonarcloud.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Path to sources
2+
sonar.sources=src/main/java
3+
#sonar.exclusions=
4+
#sonar.inclusions=
5+
6+
# Path to tests
7+
sonar.tests=src/test/java
8+
#sonar.test.exclusions=
9+
#sonar.test.inclusions=
10+
11+
# Source encoding
12+
sonar.sourceEncoding=UTF-8
13+
14+
# Exclusions for copy-paste detection
15+
#sonar.cpd.exclusions=

pom.xml

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -50,38 +50,38 @@
5050
<dependency>
5151
<groupId>org.anystub</groupId>
5252
<artifactId>anystub-core</artifactId>
53-
<version>1.3.0</version>
53+
<version>1.3.5</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>org.springframework.boot</groupId>
5757
<artifactId>spring-boot-starter-webflux</artifactId>
58-
<version>3.1.0</version>
58+
<version>3.2.8</version>
5959
</dependency>
6060
<dependency>
6161
<groupId>io.projectreactor</groupId>
6262
<artifactId>reactor-tools</artifactId>
63-
<version>3.5.4</version>
63+
<version>3.6.5</version>
6464
</dependency>
6565
<dependency>
6666
<groupId>org.springframework.boot</groupId>
6767
<artifactId>spring-boot-starter-test</artifactId>
68-
<version>3.1.0</version>
68+
<version>3.2.8</version>
6969
</dependency>
7070
<dependency>
7171
<groupId>org.springframework</groupId>
7272
<artifactId>spring-test</artifactId>
73-
<version>6.0.9</version>
73+
<version>6.1.11</version>
7474
</dependency>
7575
<dependency>
7676
<groupId>org.mockito</groupId>
7777
<artifactId>mockito-core</artifactId>
78-
<version>5.2.0</version>
78+
<version>5.3.1</version>
7979
<scope>test</scope>
8080
</dependency>
8181
<dependency>
8282
<groupId>com.github.tomakehurst</groupId>
83-
<artifactId>wiremock-jre8</artifactId>
84-
<version>2.35.0</version>
83+
<artifactId>wiremock-standalone</artifactId>
84+
<version>3.0.1</version>
8585
<scope>test</scope>
8686
</dependency>
8787

@@ -94,12 +94,12 @@
9494
<dependency>
9595
<groupId>io.projectreactor</groupId>
9696
<artifactId>reactor-core</artifactId>
97-
<version>3.5.4</version>
97+
<version>3.6.8</version>
9898
</dependency>
9999
<dependency>
100100
<groupId>io.projectreactor</groupId>
101101
<artifactId>reactor-test</artifactId>
102-
<version>3.5.4</version>
102+
<version>3.6.8</version>
103103
</dependency>
104104
<dependency>
105105
<groupId>io.reactivex.rxjava2</groupId>
@@ -110,12 +110,12 @@
110110
<dependency>
111111
<groupId>com.fasterxml.jackson.core</groupId>
112112
<artifactId>jackson-annotations</artifactId>
113-
<version>2.14.2</version>
113+
<version>2.17.2</version>
114114
</dependency>
115115
<dependency>
116116
<groupId>com.fasterxml.jackson.core</groupId>
117117
<artifactId>jackson-core</artifactId>
118-
<version>2.14.2</version>
118+
<version>2.17.2</version>
119119
</dependency>
120120

121121
</dependencies>
@@ -126,7 +126,7 @@
126126
<plugin>
127127
<groupId>org.apache.maven.plugins</groupId>
128128
<artifactId>maven-compiler-plugin</artifactId>
129-
<version>3.10.1</version>
129+
<version>3.11.0</version>
130130
<configuration>
131131
<release>11</release>
132132
</configuration>
@@ -168,7 +168,7 @@
168168
<plugin>
169169
<groupId>org.apache.maven.plugins</groupId>
170170
<artifactId>maven-surefire-plugin</artifactId>
171-
<version>3.0.0-M9</version>
171+
<version>3.1.2</version>
172172
</plugin>
173173
<plugin>
174174
<groupId>org.apache.maven.plugins</groupId>
@@ -190,35 +190,21 @@
190190
</execution>
191191
</executions>
192192
</plugin>
193-
<plugin>
194-
<groupId>org.jacoco</groupId>
195-
<artifactId>jacoco-maven-plugin</artifactId>
196-
<version>0.8.7</version>
197-
<executions>
198-
<execution>
199-
<goals>
200-
<goal>prepare-agent</goal>
201-
</goals>
202-
</execution>
203-
<execution>
204-
<id>report</id>
205-
<phase>prepare-package</phase>
206-
<goals>
207-
<goal>report</goal>
208-
</goals>
209-
</execution>
210-
</executions>
211-
<configuration>
212-
<excludes>
213-
<exclude>test/java/**/*.java</exclude>
214-
</excludes>
215-
</configuration>
216-
</plugin>
217193
<plugin>
218194
<groupId>org.apache.maven.plugins</groupId>
219195
<artifactId>maven-deploy-plugin</artifactId>
220196
<version>3.1.0</version>
221197
</plugin>
198+
<plugin>
199+
<groupId>org.sonatype.central</groupId>
200+
<artifactId>central-publishing-maven-plugin</artifactId>
201+
<version>0.6.0</version>
202+
<extensions>true</extensions>
203+
<configuration>
204+
<publishingServerId>central</publishingServerId>
205+
<autoPublish>true</autoPublish>
206+
</configuration>
207+
</plugin>
222208
</plugins>
223209
</build>
224210

src/test/java/org/anystub/UtilTest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
import org.junit.jupiter.api.Assertions;
44
import org.junit.jupiter.api.Test;
55
import org.springframework.http.HttpHeaders;
6+
import reactor.core.publisher.Flux;
67
import reactor.core.publisher.Mono;
8+
import reactor.core.scheduler.Schedulers;
79
import reactor.test.StepVerifier;
10+
import reactor.test.scheduler.VirtualTimeScheduler;
811

912
import java.io.File;
13+
import java.time.Duration;
1014
import java.util.List;
1115

1216
import static java.util.Arrays.asList;
@@ -80,4 +84,18 @@ void testNoExceptions() {
8084
}
8185

8286

87+
@Test
88+
void test() {
89+
90+
Flux<String> stringFlux = Flux.range(1, 10)
91+
.publishOn(Schedulers.boundedElastic())
92+
.flatMap(f -> Mono.fromCallable(() -> {
93+
return "";
94+
}));
95+
96+
StepVerifier.create(stringFlux)
97+
.expectNextCount(10)
98+
.verifyComplete();
99+
}
100+
83101
}

0 commit comments

Comments
 (0)