Skip to content

Commit 672e640

Browse files
committed
Setup
0 parents  commit 672e640

34 files changed

+2523
-0
lines changed

.editorconfig

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# all-encompassing default settings unless otherwise specified
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
11+
# Json
12+
[*.json]
13+
indent_size = 2
14+
indent_style = space
15+
insert_final_newline = false
16+
trim_trailing_whitespace = true
17+
18+
# Yaml
19+
[{*.yml, *.yaml}]
20+
indent_size = 2
21+
indent_style = space
22+
insert_final_newline = true
23+
trim_trailing_whitespace = true
24+
25+
# Property files
26+
[*.properties]
27+
indent_size = 2
28+
indent_style = space
29+
insert_final_newline = true
30+
trim_trailing_whitespace = true
31+
32+
# XML files
33+
[*.xml]
34+
indent_size = 4
35+
indent_style = space
36+
insert_final_newline = true
37+
trim_trailing_whitespace = true

.gitattributes

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Handle line endings automatically for files detected as text
2+
# and leave all files detected as binary untouched.
3+
* text=auto
4+
5+
6+
# The above will handle all files NOT found below
7+
# These files are text and should be normalized (Convert crlf => lf)
8+
*.bash text eol=lf
9+
*.css text diff=css
10+
*.df text
11+
*.htm text diff=html
12+
*.html text diff=html eol=lf
13+
*.java text diff=java eol=lf
14+
*.js text
15+
*.json text eol=lf
16+
*.jsp text eol=lf
17+
*.jspf text eol=lf
18+
*.jspx text eol=lf
19+
*.properties text eol=lf
20+
*.sh text eol=lf
21+
*.tld text
22+
*.txt text eol=lf
23+
*.tag text
24+
*.tagx text
25+
*.xml text
26+
*.yml text eol=lf
27+
28+
29+
# These files are binary and should be left untouched
30+
# (binary is a macro for -text -diff)
31+
# Archives
32+
*.7z binary
33+
*.br binary
34+
*.gz binary
35+
*.tar binary
36+
*.zip binary
37+
*.jar binary
38+
*.so binary
39+
*.war binary
40+
*.dll binary
41+
42+
# Documents
43+
*.pdf binary
44+
45+
# Images
46+
*.ico binary
47+
*.gif binary
48+
*.jpg binary
49+
*.jpeg binary
50+
*.png binary
51+
*.psd binary
52+
*.webp binary
53+
54+
# Fonts
55+
*.woff2 binary
56+
57+
# Other
58+
*.exe binary
59+
*.class binary
60+
*.ear binary

.github/workflows/test-master.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build Master
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
name: Running tests
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up JDK
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: "21"
18+
distribution: "adopt"
19+
20+
- name: Build classes
21+
run: "./gradlew classes"
22+
23+
- name: Build tests
24+
run: "./gradlew testClasses"
25+
26+
- name: Run tests
27+
run: "./gradlew test jacocoTestReport --no-parallel"

.github/workflows/test-pr.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "master"
7+
8+
9+
permissions:
10+
contents: read
11+
checks: write
12+
pull-requests: write
13+
14+
15+
jobs:
16+
build-tests:
17+
runs-on: ubuntu-latest
18+
name: Pull Request Java ${{ matrix.java }}
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Set up JDK
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: "21"
25+
distribution: "adopt"
26+
27+
- name: Build classes
28+
run: "./gradlew classes"
29+
30+
- name: Build tests
31+
run: "./gradlew testClasses"
32+
33+
- name: Run tests
34+
run: "./gradlew test jacocoTestReport"
35+
36+
- name: Report tests
37+
uses: EnricoMi/publish-unit-test-result-action@v2
38+
with:
39+
files: |
40+
**/test-results/**/*.xml

.gitignore

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### Package Files
2+
*.war
3+
*.nar
4+
*.ear
5+
*.zip
6+
*.tar.gz
7+
*.rar
8+
9+
### Gradle template
10+
.gradle
11+
build/
12+
target/
13+
14+
### Idea generated files
15+
.idea
16+
.settings/
17+
*.iml
18+
out/

Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
ARG RUN_IMAGE=eclipse-temurin:21-jre-jammy
2+
FROM ${RUN_IMAGE}
3+
4+
ARG TARGET_DIR=/opt/app
5+
ARG SOURCE_DIR=build/distributions
6+
7+
COPY $SOURCE_DIR/*.tar application.tar
8+
RUN mkdir $TARGET_DIR
9+
RUN tar -xf application.tar -C $TARGET_DIR
10+
RUN rm application.tar
11+
12+
ARG DOCKER_USER=app
13+
RUN groupadd -r $DOCKER_USER && useradd -rg $DOCKER_USER $DOCKER_USER
14+
USER $DOCKER_USER
15+
16+
ENV JAVA_OPTS="-Dfile.encoding=UTF-8"
17+
18+
EXPOSE 8080/tcp
19+
EXPOSE 8085/tcp
20+
CMD [ "/opt/app/application/bin/application" ]

0 commit comments

Comments
 (0)