From 455db0e6756cc3d4ffffff47fa8dd63323d920a4 Mon Sep 17 00:00:00 2001 From: Oleksandr Balan Date: Mon, 22 Aug 2022 17:06:21 +0200 Subject: [PATCH 1/2] Add static analysis GH action --- .github/static-analysis.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/static-analysis.yml diff --git a/.github/static-analysis.yml b/.github/static-analysis.yml new file mode 100644 index 0000000..a05424f --- /dev/null +++ b/.github/static-analysis.yml @@ -0,0 +1,37 @@ +# This is a workflow to verify PRs with static code analysis tools +name: Static Analysis + +# Controls when the workflow will run +on: + pull_request: + branches: [main] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + detekt: + name: Detekt + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: detekt + run: ./gradlew detekt + + spotless: + name: Spotless + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: spotless + run: ./gradlew spotlessCheck From e4dedbc9335c2a8e59fdfe7c53cf82740c17b636 Mon Sep 17 00:00:00 2001 From: Oleksandr Balan Date: Mon, 22 Aug 2022 17:08:21 +0200 Subject: [PATCH 2/2] Use the correct directory --- .github/{ => workflows}/static-analysis.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/static-analysis.yml (100%) diff --git a/.github/static-analysis.yml b/.github/workflows/static-analysis.yml similarity index 100% rename from .github/static-analysis.yml rename to .github/workflows/static-analysis.yml