diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bdf3138 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +# Builds, tests the project with Gradle +name: CI Tests + +on: + push: + branches: [ 'master' ] + paths-ignore: + - 'workflows/**' + - 'README.md' + +permissions: + contents: read + checks: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: build test publish + env: + SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: '**/build/test-results/test/TEST-*.xml' + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: artifact + path: build/libs/*.jar \ No newline at end of file diff --git a/.github/workflows/gradle-ci.yml b/.github/workflows/gradle-ci.yml deleted file mode 100644 index 3c2ddae..0000000 --- a/.github/workflows/gradle-ci.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Gradle CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - - name: Build with Gradle - uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 - with: - arguments: test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1e3d353 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +# Builds, tests and publishes to maven when a release is published +name: Release Tests + +on: + release: + types: [ published ] + +permissions: + contents: read + checks: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: build test publish + env: + RELEASES_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + RELEASES_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: '**/build/test-results/test/TEST-*.xml' + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: artifact + path: build/libs/*.jar \ No newline at end of file diff --git a/.gitignore b/.gitignore index bf3e1b2..ae216aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .gradle build/ +run/ !gradle/wrapper/gradle-wrapper.jar !**/src/main/**/build/ !**/src/test/**/build/ @@ -15,6 +16,8 @@ build/ out/ !**/src/main/**/out/ !**/src/test/**/out/ +/.idea/ +/target/ ### Eclipse ### .apt_generated @@ -39,5 +42,4 @@ bin/ .vscode/ ### Mac OS ### -.DS_Store -/.idea/ +.DS_Store \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index ace0747..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -