Skip to content

Commit f7e3574

Browse files
authored
Merge pull request #98 from r-ralph/fix-pr-workflow-2
Fix pull request workflow
2 parents 23eeeef + 0c8c577 commit f7e3574

File tree

4 files changed

+10
-22
lines changed

4 files changed

+10
-22
lines changed

.bundle/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/pull-request.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10+
with:
11+
fetch-depth: 0
1012
- uses: gradle/wrapper-validation-action@v1
1113
- uses: actions/setup-java@v1
1214
with:
@@ -20,24 +22,15 @@ jobs:
2022
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
2123
restore-keys: |
2224
${{ runner.os }}-gradle-
23-
- uses: actions/setup-ruby@v1
25+
- uses: ruby/setup-ruby@v1
2426
with:
2527
ruby-version: '3.0'
26-
- name: Restore Gem cache
27-
uses: actions/cache@v2
28-
with:
29-
path: |
30-
vendor/bundle
31-
key: ${{ runner.os }}-gem-${{ hashFiles('Gemfile') }}
32-
restore-keys: |
33-
${{ runner.os }}-gem-
28+
bundler-cache: true
3429
- name: Run lint and unit test
3530
run: ./gradlew --continue :apng-drawable:testDebugUnitTest :apng-drawable:lintDebug :apng-drawable:ktlintMainSourceSetCheck
3631
- name: Run Danger
37-
if: ${{ cancelled() }}
38-
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
JOB_STATUS: ${{ job.status }}
41-
run: |
42-
bundle install
43-
bundle exec danger --remove-previous-comments --fail-on-errors=true
32+
if: ${{ cancelled() != true }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
JOB_STATUS: ${{ job.status }}
36+
run: bundle exec danger --remove-previous-comments --fail-on-errors=true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,4 +245,3 @@ $RECYCLE.BIN/
245245
/tmp
246246
.cxx/
247247
/Gemfile.lock
248-
/vendor/bundle

Dangerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ android_lint.lint(inline_mode: true)
2222

2323
return unless status_report[:errors].empty?
2424

25-
return markdown "Check Failed" if ENV["JOB_STATUS"] != "success"
26-
27-
return markdown "Passed"
25+
return markdown "Build Failed" if ENV["JOB_STATUS"] != "success"

0 commit comments

Comments
 (0)