From 91701ee36729ac3b4066e4b2bfa38cf944714c6b Mon Sep 17 00:00:00 2001 From: Tan Jun Rong Date: Mon, 12 Apr 2021 22:28:08 +0900 Subject: [PATCH 1/6] add lint reporting --- app/src/main/res/values/strings.xml | 4 ++++ run-lint.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 run-lint.yml diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 095f0b3..c333c9e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,4 +5,8 @@ FROM TO Ops, there is an error, please restart the app… + + + Unused 123 + Unused 456 diff --git a/run-lint.yml b/run-lint.yml new file mode 100644 index 0000000..22e926a --- /dev/null +++ b/run-lint.yml @@ -0,0 +1,29 @@ +name: Android Pull Request & Master CI + +on: + pull_request: + branches: + - '*' +# push: +# branches: +# - 'master' + +jobs: + lint: + name: Run Lint + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + - name: setup JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Run lint && parse lint-results.xml && send report to PR + env: + PR_NUMBER: ${{ github.event.number }} + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + run: | + ./gradlew app:lintDebug && ./gradlew parseAndSendLintResult -PgithubPullRequestId=$PR_NUMBER -PgithubToken=$GITHUB_TOKEN From 830c730f13c5b1a73eafd9990e183de11645edda Mon Sep 17 00:00:00 2001 From: Tan Jun Rong Date: Mon, 12 Apr 2021 22:34:53 +0900 Subject: [PATCH 2/6] relocate run-lint.yml --- run-lint.yml => .github/workflows/run-lint.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename run-lint.yml => .github/workflows/run-lint.yml (100%) diff --git a/run-lint.yml b/.github/workflows/run-lint.yml similarity index 100% rename from run-lint.yml rename to .github/workflows/run-lint.yml From 267e30a0221372ef71926c46ebe5667748a7fc03 Mon Sep 17 00:00:00 2001 From: Tan Jun Rong Date: Tue, 13 Apr 2021 17:08:43 +0900 Subject: [PATCH 3/6] fix ssh key --- .github/workflows/run-lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run-lint.yml b/.github/workflows/run-lint.yml index 22e926a..452fcc9 100644 --- a/.github/workflows/run-lint.yml +++ b/.github/workflows/run-lint.yml @@ -17,6 +17,7 @@ jobs: - uses: actions/checkout@v2 with: token: ${{ secrets.BOT_GITHUB_TOKEN }} + ssh-key: ${{ secrets.SSH_KEY }} - name: setup JDK 11 uses: actions/setup-java@v1 with: From 9ff209584dcdae8f1d46edaf5e1b70fc727fe427 Mon Sep 17 00:00:00 2001 From: Tan Jun Rong Date: Wed, 14 Apr 2021 12:44:50 +0900 Subject: [PATCH 4/6] use default value for github token --- .github/workflows/run-lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-lint.yml b/.github/workflows/run-lint.yml index 452fcc9..f207088 100644 --- a/.github/workflows/run-lint.yml +++ b/.github/workflows/run-lint.yml @@ -15,9 +15,9 @@ jobs: steps: - uses: actions/checkout@v2 - with: - token: ${{ secrets.BOT_GITHUB_TOKEN }} - ssh-key: ${{ secrets.SSH_KEY }} +# with: +# token: ${{ secrets.GITHUB_TOKEN }} +# ssh-key: ${{ secrets.SSH_KEY }} - name: setup JDK 11 uses: actions/setup-java@v1 with: From 0e5bb02575356ce13f0707d4aff7f87cb1c54aaf Mon Sep 17 00:00:00 2001 From: Tan Jun Rong Date: Wed, 14 Apr 2021 12:58:51 +0900 Subject: [PATCH 5/6] try using bot token again --- .github/workflows/run-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-lint.yml b/.github/workflows/run-lint.yml index f207088..1e58a0b 100644 --- a/.github/workflows/run-lint.yml +++ b/.github/workflows/run-lint.yml @@ -15,8 +15,8 @@ jobs: steps: - uses: actions/checkout@v2 -# with: -# token: ${{ secrets.GITHUB_TOKEN }} + with: + token: ${{ secrets.GITHUB_TOKEN }} # ssh-key: ${{ secrets.SSH_KEY }} - name: setup JDK 11 uses: actions/setup-java@v1 From d39fc96aa12113366ad2f09eae7010724d7db710 Mon Sep 17 00:00:00 2001 From: Tan Jun Rong Date: Fri, 12 Nov 2021 15:27:19 +0900 Subject: [PATCH 6/6] Update run-lint.yml --- .github/workflows/run-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-lint.yml b/.github/workflows/run-lint.yml index 1e58a0b..1d1491f 100644 --- a/.github/workflows/run-lint.yml +++ b/.github/workflows/run-lint.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} # ssh-key: ${{ secrets.SSH_KEY }} - name: setup JDK 11 uses: actions/setup-java@v1