Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Domi04151309 committed Jan 30, 2024
1 parent c40fdf2 commit 8e43c98
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8e43c98

Please sign in to comment.