Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 59c489b

Browse files
authored
Merge pull request #3 from vertx-howtos/ci
Github Actions + Bump versions
2 parents c0b9a8d + a979f61 commit 59c489b

File tree

7 files changed

+63
-33
lines changed

7 files changed

+63
-33
lines changed

.github/workflows/publish.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish the how-to
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
schedule:
8+
- cron: '0 0 * * *'
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Install JDK 11
16+
uses: AdoptOpenJDK/install-jdk@v1
17+
with:
18+
version: 11
19+
- name: Run builds
20+
run: ./.run.builds.sh
21+
- name: Setup Ruby
22+
uses: actions/setup-ruby@v1
23+
with:
24+
ruby-version: '2.6'
25+
- uses: actions/checkout@v2
26+
with:
27+
ref: "gh-pages"
28+
path: "_gh_pages"
29+
- name: Run Jekyll and deploy
30+
run: ./.run.jekyll.sh

.run.jekyll.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
#!/usr/bin/env bash
1+
#/usr/bin/env bash
22
set -e
33

4+
echo "⚙️ Building with Jekyll"
5+
gem install bundler
46
bundle install
57
bundle exec jekyll build
8+
9+
echo "⚙️ Copying the files"
10+
rm -rf _gh_pages/*
11+
cp -R _site/* _gh_pages/
12+
13+
echo "🚀 Commit and push"
14+
cd _gh_pages || exit
15+
git config --global user.email "[email protected]"
16+
git config --global user.name "Vert.x howtos"
17+
git add -A
18+
git commit -m "Deploy the how-to pages"
19+
git push origin gh-pages
20+
21+
echo "✅ Done"

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Here is the content of the `pom.xml` file you should be using:
2424
include::pom.xml[]
2525
----
2626

27-
The pom contains JUnit 5 dependencies, https://vertx.io/docs/vertx-junit5/java/[vertx-junit5] and https://vertx.io/docs/vertx-junit5-web-client/java/[vertx-junit5-web-client] modules
27+
The pom contains JUnit 5 dependencies, https://vertx.io/docs/vertx-junit5/java/[vertx-junit5] and https://github.com/reactiverse/reactiverse-junit5-extensions[reactiverse-junit5-web-client] modules
2828

2929
== Create the Web application Verticle
3030

pom.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
<version>1.0-SNAPSHOT</version>
1111

1212
<properties>
13-
<vertx.version>4.0.0-milestone4</vertx.version>
13+
<vertx.version>4.0.0</vertx.version>
14+
<junit.version>5.7.0</junit.version>
15+
<reactiverse-junit5-web-client.version>0.3.0</reactiverse-junit5-web-client.version>
1416
<maven.compiler.source>1.8</maven.compiler.source>
1517
<maven.compiler.target>1.8</maven.compiler.target>
1618
</properties>
@@ -42,20 +44,21 @@
4244
<scope>test</scope>
4345
</dependency>
4446
<dependency>
45-
<groupId>io.vertx</groupId>
46-
<artifactId>vertx-junit5-web-client</artifactId>
47+
<groupId>io.reactiverse</groupId>
48+
<artifactId>reactiverse-junit5-web-client</artifactId>
49+
<version>${reactiverse-junit5-web-client.version}</version>
4750
<scope>test</scope>
4851
</dependency>
4952
<dependency>
5053
<groupId>org.junit.jupiter</groupId>
5154
<artifactId>junit-jupiter-api</artifactId>
52-
<version>5.5.2</version>
55+
<version>${junit.version}</version>
5356
<scope>test</scope>
5457
</dependency>
5558
<dependency>
5659
<groupId>org.junit.jupiter</groupId>
5760
<artifactId>junit-jupiter-engine</artifactId>
58-
<version>5.5.2</version>
61+
<version>${junit.version}</version>
5962
<scope>test</scope>
6063
</dependency>
6164
</dependencies>

src/main/java/io/vertx/howtos/web/test/WebApplicationVerticle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void start(Promise<Void> startVerticlePromise) {
6868
.requestHandler(router)
6969
.listen(9000)
7070
.<Void>mapEmpty()
71-
.setHandler(startVerticlePromise);
71+
.onComplete(startVerticlePromise);
7272
// end::startHttpServer[]
7373
}
7474

src/test/java/io/vertx/howtos/web/test/WebApplicationTest.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@
88
import io.vertx.junit5.Timeout;
99
import io.vertx.junit5.VertxExtension;
1010
import io.vertx.junit5.VertxTestContext;
11-
import io.vertx.junit5.web.VertxWebClientExtension;
12-
import io.vertx.junit5.web.WebClientOptionsInject;
11+
import io.reactiverse.junit5.web.WebClientOptionsInject;
1312
import org.junit.jupiter.api.AfterEach;
1413
import org.junit.jupiter.api.BeforeEach;
1514
import org.junit.jupiter.api.Test;
1615
import org.junit.jupiter.api.extension.ExtendWith;
1716

1817
import java.util.concurrent.TimeUnit;
1918

20-
import static io.vertx.junit5.web.TestRequest.*;
19+
import static io.reactiverse.junit5.web.TestRequest.*;
2120

2221
// tag::testExtensions[]
2322
@ExtendWith({
24-
VertxExtension.class, // VertxExtension MUST be configured before VertxWebClientExtension
25-
VertxWebClientExtension.class
23+
VertxExtension.class,
2624
})
2725
// end::testExtensions[]
2826
public class WebApplicationTest {
@@ -41,7 +39,7 @@ public class WebApplicationTest {
4139
void setUp(Vertx vertx, VertxTestContext testContext) {
4240
testContext
4341
.assertComplete(vertx.deployVerticle(new WebApplicationVerticle()))
44-
.setHandler(ar -> {
42+
.onComplete(ar -> {
4543
deploymentId = ar.result();
4644
testContext.completeNow();
4745
});
@@ -53,7 +51,7 @@ void setUp(Vertx vertx, VertxTestContext testContext) {
5351
void tearDown(Vertx vertx, VertxTestContext testContext) {
5452
testContext
5553
.assertComplete(vertx.undeploy(deploymentId))
56-
.setHandler(ar -> testContext.completeNow());
54+
.onComplete(ar -> testContext.completeNow());
5755
}
5856
// end::tearDown[]
5957

@@ -105,7 +103,7 @@ public void testPostAndGetPet(WebClient client, VertxTestContext testContext) {
105103
emptyResponse()
106104
)
107105
.sendJson(newPet, testContext, checkpoint)
108-
.setHandler(ar -> // Executed after the first response is completed
106+
.onComplete(ar -> // Executed after the first response is completed
109107
testRequest(client.get("/pet/5"))
110108
.expect(
111109
statusCode(200),

0 commit comments

Comments
 (0)