Skip to content

Commit aae4267

Browse files
committed
added virtual thread factory
1 parent 53d92e6 commit aae4267

File tree

7 files changed

+260
-163
lines changed

7 files changed

+260
-163
lines changed

.github/workflows/build.yml

Lines changed: 168 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,178 @@
11
name: Java CI with Maven
22

33
on:
4-
push:
5-
branches: "main"
6-
pull_request:
7-
branches: "*"
4+
push:
5+
branches: "main"
6+
pull_request:
7+
branches: "*"
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- name: Set up Node 22
15-
uses: actions/setup-node@v4
16-
with:
17-
node-version: '22.x'
18-
cache: 'npm'
19-
cache-dependency-path: ui/package-lock.json
20-
- name: Set up JDK 21
21-
uses: actions/setup-java@v4
22-
with:
23-
java-version: '21'
24-
distribution: 'temurin'
25-
cache: maven
26-
- name: Build with Maven
27-
run: mvn -B install --file pom.xml
28-
- name: PMD with Maven
29-
run: mvn pmd:pmd --file pom.xml
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Node 22
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: "22.x"
18+
cache: "npm"
19+
cache-dependency-path: ui/package-lock.json
20+
- name: Set up JDK 21
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: "21"
24+
distribution: "temurin"
25+
cache: maven
26+
- name: Build with Maven
27+
run: mvn -B install --file pom.xml
28+
- name: PMD with Maven
29+
run: mvn pmd:pmd --file pom.xml
3030

31-
test-mssql:
32-
runs-on: ubuntu-latest
33-
needs: build
34-
services:
35-
sql-edge:
36-
image: mcr.microsoft.com/azure-sql-edge
37-
options: --cap-add SYS_PTRACE --name azuresqledge
38-
env:
39-
ACCEPT_EULA: Y
40-
MSSQL_SA_PASSWORD: "veryStrong123"
41-
ports:
42-
- 1433:1433
43-
steps:
44-
- uses: actions/checkout@v4
45-
- name: Set up JDK 21
46-
uses: actions/setup-java@v4
47-
with:
48-
java-version: '21'
49-
distribution: 'temurin'
50-
cache: maven
51-
- name: Run tests with MSSQL
52-
run: mvn test -pl core -am -Dspring.profiles.active=mssql
31+
test-mssql:
32+
runs-on: ubuntu-latest
33+
needs: build
34+
services:
35+
sql-edge:
36+
image: mcr.microsoft.com/azure-sql-edge
37+
options: --cap-add SYS_PTRACE --name azuresqledge
38+
env:
39+
ACCEPT_EULA: Y
40+
MSSQL_SA_PASSWORD: "veryStrong123"
41+
ports:
42+
- 1433:1433
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Set up JDK 21
46+
uses: actions/setup-java@v4
47+
with:
48+
java-version: "21"
49+
distribution: "temurin"
50+
cache: maven
51+
- name: Run tests with MSSQL
52+
run: mvn test -pl core -am -Dspring.profiles.active=mssql
5353

54-
test-postgres:
55-
runs-on: ubuntu-latest
56-
needs: build
57-
services:
58-
postgres:
59-
image: postgres
60-
options: --name pg-container
61-
env:
62-
POSTGRES_USER: sa
63-
POSTGRES_PASSWORD: veryStrong123
64-
ports:
65-
- 5432:5432
66-
steps:
67-
- uses: actions/checkout@v4
68-
- name: Set up JDK 21
69-
uses: actions/setup-java@v4
70-
with:
71-
java-version: '21'
72-
distribution: 'temurin'
73-
cache: maven
74-
- name: Run tests with postgres
75-
run: mvn test -pl core -am -Dspring.profiles.active=postgres
54+
test-mssql-virtual:
55+
runs-on: ubuntu-latest
56+
needs: build
57+
services:
58+
sql-edge:
59+
image: mcr.microsoft.com/azure-sql-edge
60+
options: --cap-add SYS_PTRACE --name azuresqledge
61+
env:
62+
ACCEPT_EULA: Y
63+
MSSQL_SA_PASSWORD: "veryStrong123"
64+
ports:
65+
- 1433:1433
66+
steps:
67+
- uses: actions/checkout@v4
68+
- name: Set up JDK 21
69+
uses: actions/setup-java@v4
70+
with:
71+
java-version: "21"
72+
distribution: "temurin"
73+
cache: maven
74+
- name: Run tests with MSSQL
75+
run: mvn test -pl core -am -Dspring.profiles.active=mssql,virtual-thread
7676

77-
test-mariadb:
78-
runs-on: ubuntu-latest
79-
needs: build
80-
services:
81-
postgres:
82-
image: mariadb:latest
83-
env:
84-
MYSQL_USER: sa
85-
MYSQL_ROOT_PASSWORD: veryStrong123
86-
MYSQL_PASSWORD: veryStrong123
87-
MYSQL_DATABASE: testdb
88-
ports:
89-
- 3306:3306
90-
steps:
91-
- uses: actions/checkout@v4
92-
- name: Set up JDK 21
93-
uses: actions/setup-java@v4
94-
with:
95-
java-version: '21'
96-
distribution: 'temurin'
97-
cache: maven
98-
- name: Run tests with mariadb
99-
run: mvn test -pl core -am -Dspring.profiles.active=mariadb
77+
test-postgres:
78+
runs-on: ubuntu-latest
79+
needs: build
80+
services:
81+
postgres:
82+
image: postgres
83+
options: --name pg-container
84+
env:
85+
POSTGRES_USER: sa
86+
POSTGRES_PASSWORD: veryStrong123
87+
ports:
88+
- 5432:5432
89+
steps:
90+
- uses: actions/checkout@v4
91+
- name: Set up JDK 21
92+
uses: actions/setup-java@v4
93+
with:
94+
java-version: "21"
95+
distribution: "temurin"
96+
cache: maven
97+
- name: Run tests with postgres
98+
run: mvn test -pl core -am -Dspring.profiles.active=postgres
10099

101-
java-doc:
102-
runs-on: ubuntu-latest
103-
needs: [build]
104-
if: ${{ github.ref == 'refs/heads/main' }}
105-
permissions:
106-
contents: write # if you have a protection rule on your repository, you'll need to give write permission to the workflow.
107-
steps:
108-
- uses: actions/checkout@v4
109-
- name: Set up Node 22
110-
uses: actions/setup-node@v4
111-
with:
112-
node-version: '22.x'
113-
cache: 'npm'
114-
cache-dependency-path: ui/package-lock.json
115-
- name: Set up JDK 21
116-
uses: actions/setup-java@v4
117-
with:
118-
java-version: '21'
119-
distribution: 'temurin'
120-
cache: maven
121-
- name: Deploy JavaDoc 🚀
122-
uses: MathieuSoysal/[email protected]
123-
with:
124-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125-
javadoc-branch: javadoc
126-
java-version: 21
127-
target-folder: javadoc-core # url will be https://<username>.github.io/<repo>/javadoc-core
128-
project: maven # or gradle
100+
test-mariadb:
101+
runs-on: ubuntu-latest
102+
needs: build
103+
services:
104+
postgres:
105+
image: mariadb:latest
106+
env:
107+
MYSQL_USER: sa
108+
MYSQL_ROOT_PASSWORD: veryStrong123
109+
MYSQL_PASSWORD: veryStrong123
110+
MYSQL_DATABASE: testdb
111+
ports:
112+
- 3306:3306
113+
steps:
114+
- uses: actions/checkout@v4
115+
- name: Set up JDK 21
116+
uses: actions/setup-java@v4
117+
with:
118+
java-version: "21"
119+
distribution: "temurin"
120+
cache: maven
121+
- name: Run tests with mariadb
122+
run: mvn test -pl core -am -Dspring.profiles.active=mariadb
129123

130-
maven-deploy:
131-
runs-on: ubuntu-latest
132-
needs: [build, test-mssql, test-postgres, test-mariadb]
133-
if: ${{ github.ref == 'refs/heads/main' }}
134-
steps:
135-
- uses: actions/checkout@v4
136-
- name: Set up Node 22
137-
uses: actions/setup-node@v4
138-
with:
139-
node-version: '22.x'
140-
cache: 'npm'
141-
cache-dependency-path: ui/package-lock.json
142-
- name: Set up JDK 21
143-
uses: actions/setup-java@v4
144-
with:
145-
java-version: '21'
146-
distribution: 'temurin'
147-
cache: maven
148-
server-id: ossrh
149-
server-username: MAVEN_USERNAME
150-
server-password: MAVEN_PASSWORD
151-
- name: Deploy Nexus
152-
run: mvn -B source:jar javadoc:jar deploy --file pom.xml -DskipTests
153-
env:
154-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
155-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
124+
java-doc:
125+
runs-on: ubuntu-latest
126+
needs: [build]
127+
if: ${{ github.ref == 'refs/heads/main' }}
128+
permissions:
129+
contents: write # if you have a protection rule on your repository, you'll need to give write permission to the workflow.
130+
steps:
131+
- uses: actions/checkout@v4
132+
- name: Set up Node 22
133+
uses: actions/setup-node@v4
134+
with:
135+
node-version: "22.x"
136+
cache: "npm"
137+
cache-dependency-path: ui/package-lock.json
138+
- name: Set up JDK 21
139+
uses: actions/setup-java@v4
140+
with:
141+
java-version: "21"
142+
distribution: "temurin"
143+
cache: maven
144+
- name: Deploy JavaDoc 🚀
145+
uses: MathieuSoysal/[email protected]
146+
with:
147+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148+
javadoc-branch: javadoc
149+
java-version: 21
150+
target-folder: javadoc-core # url will be https://<username>.github.io/<repo>/javadoc-core
151+
project: maven # or gradle
152+
153+
maven-deploy:
154+
runs-on: ubuntu-latest
155+
needs: [build, test-mssql, test-postgres, test-mariadb]
156+
if: ${{ github.ref == 'refs/heads/main' }}
157+
steps:
158+
- uses: actions/checkout@v4
159+
- name: Set up Node 22
160+
uses: actions/setup-node@v4
161+
with:
162+
node-version: "22.x"
163+
cache: "npm"
164+
cache-dependency-path: ui/package-lock.json
165+
- name: Set up JDK 21
166+
uses: actions/setup-java@v4
167+
with:
168+
java-version: "21"
169+
distribution: "temurin"
170+
cache: maven
171+
server-id: ossrh
172+
server-username: MAVEN_USERNAME
173+
server-password: MAVEN_PASSWORD
174+
- name: Deploy Nexus
175+
run: mvn -B source:jar javadoc:jar deploy --file pom.xml -DskipTests
176+
env:
177+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
178+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 commit comments

Comments
 (0)