diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7b8d0a..bca3767 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,15 +2,22 @@ name: Continuous Integration on: push: - branches: [ master ] + branches: + - main pull_request: - branches: [ master ] + branches: + - main + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true jobs: ktlint: runs-on: ubuntu-latest + timeout-minutes: 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install run: | curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.0.1/ktlint @@ -19,27 +26,28 @@ jobs: - name: Run run: ktlint --reporter sarif -l none > ktlint.sarif - name: Upload SARIF - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 if: success() || failure() with: sarif_file: ktlint.sarif detekt: runs-on: ubuntu-latest + timeout-minutes: 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Java uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 - name: Run run: | chmod +x gradlew ./gradlew detekt - name: Upload SARIF - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 if: success() || failure() with: sarif_file: app/build/reports/detekt/detekt.sarif @@ -48,15 +56,16 @@ jobs: run: cat ./app/build/reports/detekt/detekt.md >> $GITHUB_STEP_SUMMARY build: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Java uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 - name: Run run: | chmod +x gradlew