Skip to content

Commit

Permalink
Add validation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonShapovalov committed Nov 10, 2024
1 parent 4860931 commit e994ed2
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
# Step "Setup Gradle" is used to configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md

name: Validation

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Build with Gradle Wrapper
run: ./gradlew build detekt
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ configurations.matching { it.name == "detekt" }.all {
detekt {
toolVersion = "1.23.7"
config.setFrom(file("config/detekt/detekt.yml"))
autoCorrect = true
buildUponDefaultConfig = true
autoCorrect = true
}

dependencies {
Expand Down

0 comments on commit e994ed2

Please sign in to comment.