From 89a92dc8cda31dbab19a4385fe2ca7f7b3fc4fcc Mon Sep 17 00:00:00 2001 From: Gergely Hegedus Date: Fri, 30 Jul 2021 23:38:25 +0300 Subject: [PATCH] ci setup --- .github/dependabot.yml | 10 +++++++ .github/workflows/publish-workflow.yml | 26 +++++++++++++++++ .github/workflows/pull-request-workflow.yml | 31 +++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/publish-workflow.yml create mode 100644 .github/workflows/pull-request-workflow.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..591f8b0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: gradle + directory: "/" + target-branch: "develop" + schedule: + interval: "weekly" + day: "monday" + time: "12:00" + open-pull-requests-limit: 15 \ No newline at end of file diff --git a/.github/workflows/publish-workflow.yml b/.github/workflows/publish-workflow.yml new file mode 100644 index 0000000..8432905 --- /dev/null +++ b/.github/workflows/publish-workflow.yml @@ -0,0 +1,26 @@ +name: Library Package Publishing + +on: + release: + types: + - created + +jobs: + publish-library: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Java + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + - name: Assemble project + env: + GITHUB_USERNAME: "fknives" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./gradlew publishMavenJavaPublicationToGitHubPackagesRepository \ No newline at end of file diff --git a/.github/workflows/pull-request-workflow.yml b/.github/workflows/pull-request-workflow.yml new file mode 100644 index 0000000..8eac94a --- /dev/null +++ b/.github/workflows/pull-request-workflow.yml @@ -0,0 +1,31 @@ +name: Verify Pull request is correct + +on: + pull_request: + branches: + - develop + +env: + GITHUB_USERNAME: "fknives" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + run-tests: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Java + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + - name: Run Java Unit Tests + run: ./gradlew processor:test + - uses: actions/upload-artifact@v2 + with: + name: Java Unit Test Results + path: processor/build/reports/tests/test/index.html + retention-days: 1 \ No newline at end of file