Skip to content

Commit 3b27b0f

Browse files
authored
#10: Migrate from Travis CI to GitHub Actions (#11)
1 parent 9def669 commit 3b27b0f

21 files changed

+825
-96
lines changed

.classpath

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<attribute name="maven.pomderived" value="true"/>
1414
</attributes>
1515
</classpathentry>
16-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9">
16+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
1717
<attributes>
1818
<attribute name="module" value="true"/>
1919
<attribute name="maven.pomderived" value="true"/>
@@ -24,5 +24,16 @@
2424
<attribute name="maven.pomderived" value="true"/>
2525
</attributes>
2626
</classpathentry>
27+
<classpathentry kind="src" path=".apt_generated">
28+
<attributes>
29+
<attribute name="optional" value="true"/>
30+
</attributes>
31+
</classpathentry>
32+
<classpathentry kind="src" output="target/test-classes" path=".apt_generated_tests">
33+
<attributes>
34+
<attribute name="test" value="true"/>
35+
<attribute name="optional" value="true"/>
36+
</attributes>
37+
</classpathentry>
2738
<classpathentry kind="output" path="target/classes"/>
2839
</classpath>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Broken Links Checker
2+
3+
on:
4+
schedule:
5+
- cron: "0 5 * * *"
6+
push:
7+
8+
jobs:
9+
linkChecker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
14+
with:
15+
use-quiet-mode: 'yes'
16+
use-verbose-mode: 'yes'
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI Build next Java
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
java-17-compatibility:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout the repository
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v2
16+
with:
17+
distribution: 'temurin'
18+
java-version: 17
19+
- name: Cache local Maven repository
20+
uses: actions/cache@v2
21+
with:
22+
path: ~/.m2/repository
23+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24+
restore-keys: |
25+
${{ runner.os }}-maven-
26+
- name: Run tests and build with Maven
27+
run: mvn --batch-mode --update-snapshots clean package -DtrimStackTrace=false
28+
- name: Publish Test Report
29+
uses: scacap/action-surefire-report@v1
30+
if: ${{ always() }}
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci-build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI Build
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout the repository
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v2
16+
with:
17+
distribution: 'temurin'
18+
java-version: 11
19+
- name: Cache local Maven repository
20+
uses: actions/cache@v2
21+
with:
22+
path: ~/.m2/repository
23+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24+
restore-keys: |
25+
${{ runner.os }}-maven-
26+
- name: Run tests and build with Maven
27+
run: |
28+
mvn --batch-mode --update-snapshots clean verify sonar:sonar \
29+
-DtrimStackTrace=false \
30+
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
31+
-Dsonar.organization=exasol \
32+
-Dsonar.host.url=https://sonarcloud.io \
33+
-Dsonar.login=$SONAR_TOKEN
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Dependencies Check
2+
3+
on:
4+
schedule:
5+
- cron: "0 2 * * *"
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up JDK 11
14+
uses: actions/setup-java@v2
15+
with:
16+
distribution: 'temurin'
17+
java-version: 11
18+
- name: Cache local Maven repository
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.m2/repository
22+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
23+
restore-keys: |
24+
${{ runner.os }}-maven-
25+
- name: Checking dependencies for vulnerabilities
26+
run: mvn org.sonatype.ossindex.maven:ossindex-maven-plugin:audit -f pom.xml
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release Droid - Prepare Original Checksum
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout the repository
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v2
16+
with:
17+
distribution: 'temurin'
18+
java-version: 11
19+
- name: Cache local Maven repository
20+
uses: actions/cache@v2
21+
with:
22+
path: ~/.m2/repository
23+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24+
restore-keys: |
25+
${{ runner.os }}-maven-
26+
- name: Run tests and build with Maven
27+
run: mvn --batch-mode clean verify --file pom.xml
28+
- name: Prepare checksum
29+
run: find target -maxdepth 1 -name *.jar -exec sha256sum "{}" + > original_checksum
30+
- name: Upload checksum to the artifactory
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: original_checksum
34+
retention-days: 5
35+
path: original_checksum
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release Droid - Print Quick Checksum
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout the repository
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v2
16+
with:
17+
distribution: 'temurin'
18+
java-version: 11
19+
- name: Cache local Maven repository
20+
uses: actions/cache@v2
21+
with:
22+
path: ~/.m2/repository
23+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24+
restore-keys: |
25+
${{ runner.os }}-maven-
26+
- name: Build with Maven skipping tests
27+
run: mvn --batch-mode clean verify -DskipTests
28+
- name: Print checksum
29+
run: echo 'checksum_start==';find target -maxdepth 1 -name *.jar -exec sha256sum "{}" + | xargs;echo '==checksum_end'
30+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release Droid - Release On Maven Central
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout the repository
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Set up Maven Central Repository
15+
uses: actions/setup-java@v2
16+
with:
17+
distribution: 'temurin'
18+
java-version: 11
19+
server-id: ossrh
20+
server-username: MAVEN_USERNAME
21+
server-password: MAVEN_PASSWORD
22+
- name: Import GPG Key
23+
run:
24+
gpg --import --batch <(echo "${{ secrets.OSSRH_GPG_SECRET_KEY }}")
25+
- name: Cache local Maven repository
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.m2/repository
29+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
30+
restore-keys: |
31+
${{ runner.os }}-maven-
32+
- name: Publish to Central Repository
33+
env:
34+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
35+
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
36+
run: mvn clean -Dgpg.skip=false -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -DskipTests deploy
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release Droid - Upload GitHub Release Assets
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
upload_url:
7+
description: 'Assets upload URL'
8+
required: true
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout the repository
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
- name: Set up JDK 11
19+
uses: actions/setup-java@v2
20+
with:
21+
distribution: 'temurin'
22+
java-version: 11
23+
- name: Cache local Maven repository
24+
uses: actions/cache@v2
25+
with:
26+
path: ~/.m2/repository
27+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-maven-
30+
- name: Build with Maven skipping tests
31+
run: mvn --batch-mode clean verify -DskipTests
32+
- name: Generate sha256sum files
33+
run: find target -maxdepth 1 -name *.jar -exec bash -c 'sha256sum {} > {}.sha256' \;
34+
- name: Upload assets to the GitHub release draft
35+
uses: shogo82148/actions-upload-release-asset@v1
36+
with:
37+
upload_url: ${{ github.event.inputs.upload_url }}
38+
asset_path: target/*.jar
39+
- name: Upload sha256sum files
40+
uses: shogo82148/actions-upload-release-asset@v1
41+
with:
42+
upload_url: ${{ github.event.inputs.upload_url }}
43+
asset_path: target/*.sha256
44+
- name: Upload error-code-report
45+
uses: shogo82148/actions-upload-release-asset@v1
46+
with:
47+
upload_url: ${{ github.event.inputs.upload_url }}
48+
asset_path: target/error_code_report.json

.gitignore

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,19 @@ target
1010
# Intellij
1111
.idea
1212
# Intellij recommends to share iml files, however, better don't share files which might be outdated
13-
*.iml
13+
*.iml
14+
.DS_Store
15+
*.swp
16+
local
17+
.dbeaver*
18+
**/*.log
19+
.directory
20+
venv/
21+
dependency-reduced-pom.xml
22+
pom.xml.versionsBackup
23+
~*
24+
*.lock
25+
*.bak
26+
*.orig
27+
*.old
28+
*.md.html

0 commit comments

Comments
 (0)