diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000000..71ec8373357 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,67 @@ +name: build + +on: + push: + branches: + - master + pull_request: + types: [opened, labeled, unlabeled, synchronize] + +env: + GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" + +jobs: + build: + name: "Build" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: gradle/wrapper-validation-action@v1 + + - name: Configure JDK + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 11 + + - name: Build Project + uses: gradle/gradle-build-action@v2 + with: + arguments: build + + - name: Build Sample + uses: gradle/gradle-build-action@v2 + with: + arguments: build + build-root-directory: sample + + - name: Publish Test Report + if: success() || failure() + uses: mikepenz/action-junit-report@v3 + with: + report_paths: '**/build/test-results/test/TEST-*.xml' + + lint: + name: "Lint" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run ktlint + uses: ScaCap/action-ktlint@1.4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-check + + qodana: + name: "Qodana" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@v2022.2.1 + - uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml deleted file mode 100644 index d0d22f7caee..00000000000 --- a/.github/workflows/gradle.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Project Build - -on: [push, pull_request] - -env: - GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: gradle/wrapper-validation-action@v1 - - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - - run: ./gradlew build - - run: cd sample && ./gradlew build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index fb6e0d53220..00000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: lint - -on: [pull_request] - -jobs: - ktlint: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Run ktlint - uses: ScaCap/action-ktlint@1.4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - reporter: github-pr-check diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 00000000000..df8d7f4fa7b --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,8 @@ +version: "1.0" +linter: jetbrains/qodana-jvm-community:2022.2 +profile: + name: qodana.recommended +exclude: + - name: All + paths: + - sample