diff --git a/.github/workflows/gradle_app_pull_request.yml b/.github/workflows/gradle_app_pull_request.yml new file mode 100644 index 0000000..1a9780d --- /dev/null +++ b/.github/workflows/gradle_app_pull_request.yml @@ -0,0 +1,60 @@ +# +# File: ./.github/workflows/pull_requests.yml +# +name: Pull Request + +on: + workflow_call: + +jobs: + commitlint: + # + # ensures commit messages follow conventional commits + # + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-node@v1 + with: + node-version: 14 + - run: npm install --save-dev @commitlint/{config-conventional,cli} + - run: npx commitlint --from=${{ github.event.pull_request.base.sha }} + lint: + # + # runs java/kotlin lint + # https://github.com/github/super-linter + # + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Lint Code Base + uses: github/super-linter/slim@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FILTER_REGEX_INCLUDE: .*src/.* + build: + # + # ensures build & tests pass + # + # gradle build task is included in the build task unless is explicitly excluded in you build.gradle + # + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'adopt' + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Build with Gradle + uses: gradle/gradle-build-action@v1 + with: + arguments: build diff --git a/README.md b/README.md index cea499a..898130f 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This repo contains GitHub Action Workflow Templates for Kochava's various workfl | Go App | go_app | go/app/{version} | Used for Go application projects intended to be deployed as a Docker image. Tests/Lints on PRs, Creates a Release based on conventional commits when merged to main, Publishes Docker image on Release. | | Go Library | go_lib | go/lib/{version} | Used for Go library projects intended to be imported. Tests/Lints on PRs, Creates a Release based on conventional commits when merged to main. | | PHP Library | php_lib | php/lib/{version} | Used for PHP library projects intended to be imported. Tests/Lints on PRs, Creates a Release based on conventional commits when merged to main. | +| Gradle Library | gradle_app | gradle/app/{version} | Used for Gradle Java/Kotlin application projects intended to be deployed as a Jar file. Tests/Lints on PRs, Creates a Release based on conventional commits when merged to main. | ## Versioning