Skip to content

Commit 03a7256

Browse files
committed
Update spotbugs and add github actions. | A long time ago, in a galaxy far far away... (C) whatthecommit.com :)
1 parent 51321cc commit 03a7256

File tree

3 files changed

+152
-36
lines changed

3 files changed

+152
-36
lines changed

.github/workflows/ci.yaml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: jersey-netty-cdi-jackson-file-eventstore
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
workflow_dispatch:
8+
inputs:
9+
git-ref:
10+
description: Git Ref (Optional)
11+
required: false
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Cache jersey-netty-cdi-jackson-file-eventstore mvn
18+
id: jersey-netty-cdi-jackson-file-eventstore-mvn
19+
uses: actions/cache@v2
20+
with:
21+
path: |
22+
~/.m2/repository
23+
!~/.m2/repository/com/gituhb/daggerok
24+
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
25+
- name: Set up JDK 11
26+
uses: actions/setup-java@v1
27+
with:
28+
java-version: 11
29+
- name: Cleanup local system cache
30+
run: sudo rm -rf ~/.m2/repository/com/github/daggerok
31+
- run: ./mvnw -B dependency:resolve-plugins dependency:resolve
32+
- run: ./mvnw
33+
spotbugs:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
- name: Cache jersey-netty-cdi-jackson-file-eventstore mvn
38+
id: jersey-netty-cdi-jackson-file-eventstore-mvn
39+
uses: actions/cache@v2
40+
with:
41+
path: |
42+
~/.m2/repository
43+
!~/.m2/repository/com/gituhb/daggerok
44+
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
45+
- name: Set up JDK 11
46+
uses: actions/setup-java@v1
47+
with:
48+
java-version: 11
49+
- name: Cleanup local system cache
50+
run: sudo rm -rf ~/.m2/repository/com/github/daggerok
51+
- run: ./mvnw -B dependency:resolve-plugins dependency:resolve
52+
- run: ./mvnw spotbugs:check
53+
display-property-updates:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v2
57+
- name: Cache jersey-netty-cdi-jackson-file-eventstore mvn
58+
id: jersey-netty-cdi-jackson-file-eventstore-mvn
59+
uses: actions/cache@v2
60+
with:
61+
path: |
62+
~/.m2/repository
63+
!~/.m2/repository/com/gituhb/daggerok
64+
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
65+
- name: Set up JDK 11
66+
uses: actions/setup-java@v1
67+
with:
68+
java-version: 11
69+
- name: Cleanup local system cache
70+
run: sudo rm -rf ~/.m2/repository/com/github/daggerok
71+
- run: ./mvnw -B dependency:resolve-plugins dependency:resolve
72+
- run: ./mvnw versions:display-property-updates
73+
javadoc:
74+
if: github.event.inputs.git-ref != ''
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v2
78+
- name: Cache jersey-netty-cdi-jackson-file-eventstore mvn
79+
id: jersey-netty-cdi-jackson-file-eventstore-mvn
80+
uses: actions/cache@v2
81+
with:
82+
path: |
83+
~/.m2/repository
84+
!~/.m2/repository/com/gituhb/daggerok
85+
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
86+
- name: Set up JDK 11
87+
uses: actions/setup-java@v1
88+
with:
89+
java-version: 11
90+
- name: Cleanup local system cache
91+
run: sudo rm -rf ~/.m2/repository/com/github/daggerok
92+
- run: ./mvnw -B dependency:resolve-plugins dependency:resolve
93+
- name: Build javadoc
94+
run: ./mvnw javadoc:javadoc
95+
docs:
96+
runs-on: ubuntu-latest
97+
steps:
98+
- uses: actions/checkout@v2
99+
- name: Cache jersey-netty-cdi-jackson-file-eventstore
100+
id: jersey-netty-cdi-jackson-file-eventstore
101+
uses: actions/cache@v2
102+
with:
103+
path: |
104+
~/.gems
105+
~/.bundle
106+
~/.m2/repository
107+
!~/.m2/repository/com/gituhb/daggerok
108+
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
109+
- name: Set up JDK 11
110+
uses: actions/setup-java@v1
111+
with:
112+
java-version: 11
113+
- name: Cleanup local system cache
114+
run: sudo rm -rf ~/.m2/repository/com/github/daggerok
115+
- run: ./mvnw -B dependency:resolve-plugins dependency:resolve
116+
- uses: actions/setup-ruby@v1
117+
with:
118+
ruby-version: '2.6'
119+
- run: ./mvnw -Dbundle=`which bundle` -P gem-install
120+
- run: ./mvnw -Dbundle=`which bundle` -P bundle-update-jekyll
121+
- run: ./mvnw -Dbundle=`which bundle` -P bundle-install
122+
- run: ./mvnw -Dbundle=`which bundle` -P jekyll-search
123+
- run: ./mvnw -Dbundle=`which bundle` -P jekyll-build
124+
- name: Deploy 🚀
125+
uses: JamesIves/[email protected]
126+
with:
127+
branch: gh-pages # The branch the action should deploy to.
128+
folder: docs/_site # The folder the action should deploy.

.travis.yml

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
include:
4040

4141
- stage: test
42-
name: test
42+
name: integration test
4343
script:
4444
- cd $TRAVIS_BUILD_DIR && ./mvnw
4545
- java -jar $TRAVIS_BUILD_DIR/target/*-all.jar &
@@ -91,41 +91,7 @@ jobs:
9191
- http get :8080/counter/0-0-0-0-0
9292
- stop_any 80 8080
9393

94-
- stage: test
95-
jdk: openjdk11
96-
name: display-property-updates
97-
script: cd $TRAVIS_BUILD_DIR && ./mvnw versions:display-property-updates -U
98-
99-
- stage: test
100-
name: test documentation build
101-
script:
102-
- cd $TRAVIS_BUILD_DIR && ./mvnw exec:exec
103-
- cd $TRAVIS_BUILD_DIR && ./mvnw -Pjekyll-search
104-
- cd $TRAVIS_BUILD_DIR && ./mvnw -Pjekyll-build
105-
106-
- stage: deploy
107-
name: GitHub release and GitHub pages deployment
108-
script: skip
109-
if: branch = "master" AND type NOT IN (pull_request)
110-
before_deploy:
111-
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ ".$TRAVIS_BRANCH" != ".master" ] ; then exit 0 ; fi
112-
- set -e
113-
- ./mvnw exec:exec
114-
- ./mvnw -Pjekyll-search
115-
- ./mvnw -Pjekyll-build
116-
deploy:
117-
provider: pages
118-
skip-cleanup: true
119-
github-token: "$GITHUB_TOKEN"
120-
keep-history: true
121-
local-dir: docs/_site
122-
target_branch: gh-pages
123-
on:
124-
branch: master
125-
condition: "$TRAVIS_PULL_REQUEST = false"
126-
12794
cache:
128-
bundler: true
12995
packages: true
13096
directories:
13197
- "~/.m2"

pom.xml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
2929
<jandex-maven-plugin.version>1.0.8</jandex-maven-plugin.version>
3030
<capsule-maven-plugin.version>1.5.1</capsule-maven-plugin.version>
31-
<spotbugs-maven-plugin.version>3.1.12.2</spotbugs-maven-plugin.version>
31+
<spotbugs-maven-plugin.version>4.2.0</spotbugs-maven-plugin.version>
3232
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
3333
<bundle>bundle</bundle>
3434
</properties>
@@ -236,6 +236,28 @@
236236
<profiles>
237237
<profile>
238238
<id>gem-install</id>
239+
<build>
240+
<defaultGoal>exec:exec</defaultGoal>
241+
<plugins>
242+
<plugin>
243+
<groupId>org.codehaus.mojo</groupId>
244+
<artifactId>exec-maven-plugin</artifactId>
245+
<configuration>
246+
<workingDirectory>${project.basedir}/docs</workingDirectory>
247+
<executable>gem</executable>
248+
<arguments>
249+
<argument>install</argument>
250+
<argument>bundler</argument>
251+
<argument>jekyll</argument>
252+
<argument>just-the-docs</argument>
253+
</arguments>
254+
</configuration>
255+
</plugin>
256+
</plugins>
257+
</build>
258+
</profile>
259+
<profile>
260+
<id>gem-user-install</id>
239261
<build>
240262
<defaultGoal>exec:exec</defaultGoal>
241263
<plugins>

0 commit comments

Comments
 (0)