Skip to content

Commit 681fc9a

Browse files
authored
Merge pull request #1 from graphql-java-kickstart/master
update
2 parents 4dc7ac0 + fb69545 commit 681fc9a

File tree

164 files changed

+4254
-2987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+4254
-2987
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Additional context**
32+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question
4+
url: https://github.com/graphql-java-kickstart/graphql-java-servlet/discussions
5+
about: Anything you are not sure about? Ask the community in Discussions!
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/pull-request.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: "Pull request"
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
jobs:
6+
validation:
7+
name: Gradle Wrapper Validation
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: gradle/wrapper-validation-action@v1
12+
test:
13+
name: Test run
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ ubuntu-latest, macos-latest, windows-latest ]
18+
java: [ 8, 11, 15 ]
19+
needs: validation
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
- name: Setup Java
25+
uses: actions/setup-java@v1
26+
with:
27+
java-version: ${{ matrix.java }}
28+
- name: Cache Gradle
29+
uses: actions/cache@v2
30+
env:
31+
java-version: ${{ matrix.java }}
32+
with:
33+
path: |
34+
~/.gradle/caches
35+
~/.gradle/wrapper
36+
key: ${{ runner.os }}-${{ env.java-version }}-gradle-${{ hashFiles('**/*.gradle*') }}
37+
restore-keys: |
38+
${{ runner.os }}-${{ env.java-version }}-gradle-
39+
- name: Make gradlew executable (non-Windows only)
40+
if: matrix.os != 'windows-latest'
41+
run: chmod +x ./gradlew
42+
- name: Gradle Check (non-Windows)
43+
if: matrix.os != 'windows-latest'
44+
run: ./gradlew --info check
45+
- name: Gradle Check (Windows)
46+
if: matrix.os == 'windows-latest'
47+
shell: cmd
48+
run: gradlew --info check
49+
build:
50+
name: Sonar analysis
51+
needs: validation
52+
runs-on: ubuntu-latest
53+
env:
54+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
55+
steps:
56+
- uses: actions/checkout@v2
57+
if: env.SONAR_TOKEN != null
58+
with:
59+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
60+
- name: Set up JDK 11
61+
if: env.SONAR_TOKEN != null
62+
uses: actions/setup-java@v1
63+
with:
64+
java-version: 11
65+
- name: Cache SonarCloud packages
66+
if: env.SONAR_TOKEN != null
67+
uses: actions/cache@v1
68+
with:
69+
path: ~/.sonar/cache
70+
key: ${{ runner.os }}-sonar
71+
restore-keys: ${{ runner.os }}-sonar
72+
- name: Cache Gradle packages
73+
if: env.SONAR_TOKEN != null
74+
uses: actions/cache@v1
75+
with:
76+
path: ~/.gradle/caches
77+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
78+
restore-keys: ${{ runner.os }}-gradle
79+
- name: Build and analyze
80+
if: env.SONAR_TOKEN != null
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
83+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
84+
run: ./gradlew build jacocoTestReport sonarqube --info

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "Publish release"
2+
on: [ workflow_dispatch ]
3+
4+
jobs:
5+
validation:
6+
name: Gradle Wrapper Validation
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: gradle/wrapper-validation-action@v1
11+
test:
12+
name: Test run
13+
needs: validation
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Setup Java
19+
uses: actions/setup-java@v1
20+
with:
21+
java-version: 8
22+
- name: Cache Gradle
23+
uses: actions/cache@v2
24+
env:
25+
java-version: 8
26+
with:
27+
path: |
28+
~/.gradle/caches
29+
~/.gradle/wrapper
30+
key: ${{ runner.os }}-${{ env.java-version }}-gradle-${{ hashFiles('**/*.gradle*') }}
31+
restore-keys: |
32+
${{ runner.os }}-${{ env.java-version }}-gradle-
33+
- name: Make gradlew executable
34+
run: chmod +x ./gradlew
35+
- name: Gradle Check
36+
run: ./gradlew --info check
37+
build:
38+
name: Publish release
39+
needs: test
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v2
44+
- name: Setup Java
45+
uses: actions/setup-java@v1
46+
with:
47+
java-version: 8
48+
- name: Cache Gradle
49+
uses: actions/cache@v2
50+
env:
51+
java-version: 8
52+
with:
53+
path: |
54+
~/.gradle/caches
55+
~/.gradle/wrapper
56+
key: ${{ runner.os }}-${{ env.java-version }}-gradle-${{ hashFiles('**/*.gradle*') }}
57+
restore-keys: |
58+
${{ runner.os }}-${{ env.java-version }}-gradle-
59+
- name: Make gradlew executable
60+
run: chmod +x ./gradlew
61+
- name: Publish release
62+
env:
63+
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
64+
BINTRAY_PASS: ${{ secrets.BINTRAY_PASSWORD }}
65+
OSS_USER_TOKEN_KEY: ${{ secrets.OSS_USER_TOKEN_KEY }}
66+
OSS_USER_TOKEN_PASS: ${{ secrets.OSS_USER_TOKEN_PASS }}
67+
run: bash github-build.sh

.github/workflows/snapshot.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: "Publish snapshot"
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
validation:
9+
name: Gradle Wrapper Validation
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: gradle/wrapper-validation-action@v1
14+
test:
15+
name: Test run
16+
needs: validation
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
- name: Setup Java
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: 8
25+
- name: Cache Gradle
26+
uses: actions/cache@v2
27+
env:
28+
java-version: 8
29+
with:
30+
path: |
31+
~/.gradle/caches
32+
~/.gradle/wrapper
33+
key: ${{ runner.os }}-${{ env.java-version }}-gradle-${{ hashFiles('**/*.gradle*') }}
34+
restore-keys: |
35+
${{ runner.os }}-${{ env.java-version }}-gradle-
36+
- name: Make gradlew executable
37+
run: chmod +x ./gradlew
38+
- name: Gradle Check
39+
run: ./gradlew --info check
40+
build:
41+
name: Publish snapshot
42+
needs: test
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
- name: Setup Java
48+
uses: actions/setup-java@v1
49+
with:
50+
java-version: 8
51+
- name: Cache Gradle
52+
uses: actions/cache@v2
53+
env:
54+
java-version: 8
55+
with:
56+
path: |
57+
~/.gradle/caches
58+
~/.gradle/wrapper
59+
key: ${{ runner.os }}-${{ env.java-version }}-gradle-${{ hashFiles('**/*.gradle*') }}
60+
restore-keys: |
61+
${{ runner.os }}-${{ env.java-version }}-gradle-
62+
- name: Make gradlew executable
63+
run: chmod +x ./gradlew
64+
- name: Gradle Publish Snapshot
65+
env:
66+
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
67+
BINTRAY_PASS: ${{ secrets.BINTRAY_PASSWORD }}
68+
run: ./gradlew artifactoryPublish -Dsnapshot=true -Dbuild.number=${{ env.GITHUB_RUN_NUMBER }}
69+
sonar:
70+
name: Sonar analysis
71+
needs: validation
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v2
75+
with:
76+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
77+
- name: Set up JDK 11
78+
uses: actions/setup-java@v1
79+
with:
80+
java-version: 11
81+
- name: Cache SonarCloud packages
82+
uses: actions/cache@v1
83+
with:
84+
path: ~/.sonar/cache
85+
key: ${{ runner.os }}-sonar
86+
restore-keys: ${{ runner.os }}-sonar
87+
- name: Cache Gradle packages
88+
uses: actions/cache@v1
89+
with:
90+
path: ~/.gradle/caches
91+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
92+
restore-keys: ${{ runner.os }}-gradle
93+
- name: Build and analyze
94+
env:
95+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
96+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
97+
run: ./gradlew build jacocoTestReport sonarqube --info

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ build/
33
*.iml
44
*.ipr
55
*.iws
6-
.idea/
6+
**/.idea/
77
target/
88
/out/
99
.classpath
1010
.project
1111
.settings
1212
bin
13+
.DS_Store
14+
/**/out/

.travis.yml

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

CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# How to contribute
2+
3+
We're really glad you're reading this, because we need more volunteer developers
4+
to help with this project! If you haven't already, connect with us on
5+
[Spectrum](https://spectrum.chat/graphql-java-kick?tab=posts).
6+
7+
We can use all the help we can get on all our [GraphQL Java Kickstart](https://github.com/graphql-java-kickstart)
8+
projects. This work ranges from adding new features, fixing bugs, and answering questions to writing documentation.
9+
10+
## Answering questions and writing documentation
11+
12+
A lot of the questions asked on Spectrum or Github are caused by a lack of documentation.
13+
We should strive from now on to answer questions by adding content to
14+
our [documentation](https://github.com/graphql-java-kickstart/documentation) and referring
15+
them to the newly created content.
16+
17+
Continuous integration will make sure that the changes are automatically deployed to
18+
https://www.graphql-java-kickstart.com.
19+
20+
## Submitting changes
21+
22+
Please send a Pull Request with a clear list of what you've done using the
23+
[Github flow](https://guides.github.com/introduction/flow/). We can always use more
24+
test coverage, so we'd love to see that in the pull requests too. And make sure to
25+
follow our coding conventions (below) and make sure all your commits are atomic
26+
(one feature per commit).
27+
28+
## Coding conventions
29+
30+
We use Google Style guides for our projects. See the
31+
[Java Style Guide](https://google.github.io/styleguide/javaguide.html) for a detailed
32+
description. You can download the
33+
[IntelliJ Java Google Style](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml)
34+
to import in these settings in IntelliJ.
35+
36+
### SonarLint
37+
38+
It would also be very helpful to install the SonarLint plugin in your IDE and fix any
39+
relevant SonarLint issues before pushing a PR. We're aware that the current state
40+
of the code raises a lot of SonarLint issues out of the box, but any help in reducing
41+
that is appreciated. More importantly we don't increase that technical debt.

0 commit comments

Comments
 (0)