Skip to content

Commit

Permalink
[#493] Update danger integration work flow
Browse files Browse the repository at this point in the history
[#493] Remove lint from danger
  • Loading branch information
thawzintoe-ptut committed Jan 10, 2025
1 parent 54f5f56 commit ddd1fb5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 39 deletions.
47 changes: 28 additions & 19 deletions .github/workflows/review_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,34 @@ concurrency:
cancel-in-progress: true

jobs:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: MeilCli/danger-action@v6
with:
plugins_file: 'Gemfile'
install_path: 'vendor/bundle'
danger_file: 'Dangerfile'
danger_id: 'danger-pr'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

review_pull_request:
name: Review pull request
runs-on: ubuntu-latest
Expand Down Expand Up @@ -48,22 +76,3 @@ jobs:
- name: Run unit tests with Kover on template-compose
working-directory: ./template-compose
run: ./gradlew koverXmlReport

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true

- name: Cache gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Run Danger
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec danger
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,8 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true

- name: Cache gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Bundle and check environment versions
run: |
echo 'Install Bundle'
bundle config path vendor/bundle
bundle install
echo 'Check environment setup versions'
ruby --version
gem --version
bundler --version
ruby-version: '2.7'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Run Danger
env:
Expand Down

0 comments on commit ddd1fb5

Please sign in to comment.