Skip to content

Commit ddd1fb5

Browse files
[#493] Update danger integration work flow
[#493] Remove lint from danger
1 parent 54f5f56 commit ddd1fb5

File tree

2 files changed

+30
-39
lines changed

2 files changed

+30
-39
lines changed

.github/workflows/review_pull_request.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,34 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12+
danger:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up JDK
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'temurin'
20+
java-version: '17'
21+
- uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: '3.0'
24+
bundler-cache: true
25+
- uses: actions/cache@v4
26+
with:
27+
path: vendor/bundle
28+
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }}
29+
restore-keys: |
30+
${{ runner.os }}-gems-
31+
- uses: MeilCli/danger-action@v6
32+
with:
33+
plugins_file: 'Gemfile'
34+
install_path: 'vendor/bundle'
35+
danger_file: 'Dangerfile'
36+
danger_id: 'danger-pr'
37+
env:
38+
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
1240
review_pull_request:
1341
name: Review pull request
1442
runs-on: ubuntu-latest
@@ -48,22 +76,3 @@ jobs:
4876
- name: Run unit tests with Kover on template-compose
4977
working-directory: ./template-compose
5078
run: ./gradlew koverXmlReport
51-
52-
- name: Set up Ruby
53-
uses: ruby/setup-ruby@v1
54-
with:
55-
ruby-version: '2.7'
56-
bundler-cache: true
57-
58-
- name: Cache gems
59-
uses: actions/cache@v2
60-
with:
61-
path: vendor/bundle
62-
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
63-
restore-keys: |
64-
${{ runner.os }}-gems-
65-
66-
- name: Run Danger
67-
env:
68-
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69-
run: bundle exec danger

template-compose/.github/workflows/template_review_pull_request.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,8 @@ jobs:
4141
- name: Set up Ruby
4242
uses: ruby/setup-ruby@v1
4343
with:
44-
ruby-version: '2.7'
45-
bundler-cache: true
46-
47-
- name: Cache gems
48-
uses: actions/cache@v2
49-
with:
50-
path: vendor/bundle
51-
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
52-
restore-keys: |
53-
${{ runner.os }}-gems-
54-
55-
- name: Install Bundle and check environment versions
56-
run: |
57-
echo 'Install Bundle'
58-
bundle config path vendor/bundle
59-
bundle install
60-
echo 'Check environment setup versions'
61-
ruby --version
62-
gem --version
63-
bundler --version
44+
ruby-version: '2.7'
45+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
6446

6547
- name: Run Danger
6648
env:

0 commit comments

Comments
 (0)