Skip to content

Commit 1597834

Browse files
add github actions
1 parent 7b1446c commit 1597834

File tree

7 files changed

+201
-0
lines changed

7 files changed

+201
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
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+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
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: ''
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/ci-actions.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'README.md'
7+
pull_request:
8+
types: [assigned, opened, synchronize, reopened, ready_for_review, edited]
9+
paths-ignore:
10+
- 'README.md'
11+
schedule:
12+
- cron: '0 0 * * *'
13+
14+
jobs:
15+
build-jdk11:
16+
name: "JDK 11 Build"
17+
runs-on: ubuntu-latest
18+
# Skip draft PRs and those with WIP in the subject, rerun as soon as its removed
19+
if: "github.event_name != 'pull_request' || ( \
20+
github.event.pull_request.draft == false && \
21+
github.event.pull_request.state != 'closed' && \
22+
contains(github.event.pull_request.title, 'wip ') == false && \
23+
contains(github.event.pull_request.title, '[wip]') == false && \
24+
(
25+
github.event.action != 'edited' || \
26+
contains(github.event.changes.title.from, 'wip ') || \
27+
contains(github.event.changes.title.from, '[wip]') \
28+
) \
29+
)"
30+
steps:
31+
- uses: actions/checkout@v2
32+
- uses: n1hility/cancel-previous-runs@v2
33+
if: github.event_name == 'pull_request'
34+
with:
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
- name: Set up JDK 11
37+
# Uses sha for added security since tags can be updated
38+
uses: joschi/setup-jdk@b9cc6eabf7e7e3889766b5cee486f874c9e1bd2d
39+
with:
40+
java-version: 11
41+
- name: Build with Maven and Coverage
42+
if: github.event_name == 'pull_request'
43+
run: mvn verify -P coverage
44+
- name: Build with Maven and Coverage/Sonar
45+
if: github.event_name != 'pull_request'
46+
run: mvn verify -P coverage,sonar
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
50+
- name: Codecov metrics
51+
uses: codecov/codecov-action@v1
52+
- name: Prepare failure archive (if maven failed)
53+
if: failure()
54+
shell: bash
55+
run: find . -name '*-reports' -type d | tar -czvf test-reports.tgz -T -
56+
- name: Upload failure Archive (if maven failed)
57+
uses: actions/upload-artifact@v1
58+
if: failure()
59+
with:
60+
name: test-reports-linux-jvm11
61+
path: 'test-reports.tgz'

.github/workflows/greetings.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Greetings
2+
3+
on: [pull_request, issues]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/first-interaction@v1
10+
with:
11+
repo-token: ${{ secrets.GITHUB_TOKEN }}
12+
issue-message: 'Cogratulations! You have just created your first issue. Thanks for contributting to this project! We will answer you as soon as possible'' first issue'
13+
pr-message: 'Congratulations! YOu have just created your first pull request. Thanks for contributing to this project! We will review your pull request as soon as possible'' first pr'

.github/workflows/release-actions.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build-jdk11:
10+
name: "JDK 11 Build"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up JDK 11
15+
# Uses sha for added security since tags can be updated
16+
uses: joschi/setup-jdk@b9cc6eabf7e7e3889766b5cee486f874c9e1bd2d
17+
with:
18+
java-version: 11
19+
- name: Build
20+
run: |
21+
mvn -e -B -DskipTests=true -DskipDocs clean install
22+
- name: Release Maven package
23+
uses: samuelmeuli/action-maven-publish@v1
24+
with:
25+
gpg_private_key: ${{ secrets.gpg_private_key }}
26+
gpg_passphrase: ${{ secrets.gpg_passphrase }}
27+
nexus_username: ${{ secrets.nexus_username }}
28+
nexus_password: ${{ secrets.nexus_password }}
29+
- name: changelog
30+
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
31+
id: Changelog
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
env:
35+
REPO: ${{ github.repository }}
36+
- name: Create Release
37+
id: create_release
38+
# Uses sha for added security since tags can be updated
39+
uses: actions/create-release@8f324cdc2e5470815db0a286b4b3aa7803c0e6ef
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
tag_name: ${{ github.ref }}
44+
release_name: Release ${{ github.ref }}
45+
body: |
46+
${{ steps.Changelog.outputs.changelog }}
47+
draft: false
48+
prerelease: false

.github/workflows/stale.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
stale:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/stale@v1
14+
with:
15+
repo-token: ${{ secrets.GITHUB_TOKEN }}
16+
stale-issue-message: 'This issue has been there for very long time and nobody changed it.'
17+
stale-pr-message: 'This pull request has been there for very long time and nobody changed it'
18+
stale-issue-label: 'no-issue-activity'
19+
stale-pr-label: 'no-pr-activity'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ target
5151
# Maven shade
5252
#############
5353
*dependency-reduced-pom.xml
54+
55+
/lsp/

0 commit comments

Comments
 (0)