Skip to content

Commit

Permalink
Add first version
Browse files Browse the repository at this point in the history
  • Loading branch information
alaugks committed Jul 5, 2023
0 parents commit 76b8a84
Show file tree
Hide file tree
Showing 65 changed files with 3,301 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Maven Test"
run-name: Maven Test [${{ github.ref_type }}][${{ github.ref }}]
on:
push:
branches:
- main
- stage
- dev
# workflow_dispatch:
jobs:
tests:
name: Run tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-package: 'jdk'
java-version: '17'
check-latest: true
cache: 'maven'
- name: Install & Run Rests
run: |
mvn install
mvn test
35 changes: 35 additions & 0 deletions .github/workflows/ossrh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Action configuration is based on the following articles:
# https://blogs.itemis.com/en/github-actions-releasing-artifacts-into-maven-central
name: "OSSRH Release"
run-name: OSSRH Release [${{ github.ref_type }}][${{ github.ref }}]
on:
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-package: 'jdk'
java-version: '17'
check-latest: true
server-id: 'ossrh'
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PRIVATE_KEY_PASSPHRASE
cache: 'maven'
- name: Build & Deploy
run: |
mvn -U -B clean deploy -P release
env:
GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

57 changes: 57 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "SonarCloud Analyze"
run-name: SonarCloud Analyze [${{ github.ref_type }}][${{ github.ref }}]
on:
# push:
# branches:
# - master
# pull_request:
# types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_PROJECT_KEY: ${{ vars.SONAR_PROJECT_KEY }} # -Dsonar.projectKey=$SONAR_PROJECTKEY
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze (dev)
run: |
mvn test -P test-coverage
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.projectName=${{ vars.SONAR_PROJECT_NAME }} \
-Dsonar.projectKey=${{ vars.SONAR_PROJECT_KEY }} \
-Dsonar.branch.name=${{ steps.branch-name.outputs.ref_branch }} \
-Dsonar.organization=${{ vars.SONAR_ORGANIZATION }} \
-Dsonar.host.url=${{ vars.SONAR_HOST_URL }} \
-Dsonar.coverage.jacoco.xmlReportPaths=${{ vars.SONAR_COVERAGE_JACOCO_XML_REPORT_PATHS }} \
-Dsonar.sources=${{ vars.SONAR_SOURCES }} \
-Dsonar.tests=${{ vars.SONAR_TESTS }} \
-Dsonar.exclusions=${{ vars.SONAR_EXCLUSIONS }} \
-Dsonar.java.binaries=${{ vars.SONAR_JAVA_BINARIES }} \
-Dsonar.coverage.exclusions=${{ vars.SONAR_COVERAGE_EXCLUSIONS }} \
-Dsonar.java.source=${{ vars.SONAR_JAVA_SOURCE }}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
HELP.md
target/
!**/src/main/**/target/
!**/src/test/**/target/
mvnw
mvnw.cmd
/.mvn/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
Loading

0 comments on commit 76b8a84

Please sign in to comment.