From cb20a5c7a22e93d6b63ed7dafb5e1a077dfe892a Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Mon, 5 Jan 2026 14:07:57 -0500 Subject: [PATCH] Migrate from Travis CI to GitHub Actions with danger-pr-comment workflow Co-authored-by: GitHub Copilot --- .github/workflows/danger-comment.yml | 11 +++++++++++ .github/workflows/danger.yml | 13 +++++++++++++ .github/workflows/rubocop.yml | 18 ++++++++++++++++++ .github/workflows/test.yml | 21 +++++++++++++++++++++ .travis.yml | 5 ----- CHANGELOG.md | 1 + Dangerfile | 6 ++++-- Gemfile | 6 ++++-- README.md | 2 +- 9 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/danger-comment.yml create mode 100644 .github/workflows/danger.yml create mode 100644 .github/workflows/rubocop.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/danger-comment.yml b/.github/workflows/danger-comment.yml new file mode 100644 index 0000000..8e15cb6 --- /dev/null +++ b/.github/workflows/danger-comment.yml @@ -0,0 +1,11 @@ +name: Danger Comment + +on: + workflow_run: + workflows: [Danger] + types: [completed] + +jobs: + comment: + uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.1.0 + secrets: inherit diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml new file mode 100644 index 0000000..bd89a88 --- /dev/null +++ b/.github/workflows/danger.yml @@ -0,0 +1,13 @@ +name: Danger + +on: + pull_request: + types: [opened, reopened, edited, synchronize] + +jobs: + danger: + uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v0.1.0 + secrets: inherit + with: + ruby-version: '3.4' + bundler-cache: true diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml new file mode 100644 index 0000000..b84b8e2 --- /dev/null +++ b/.github/workflows/rubocop.yml @@ -0,0 +1,18 @@ +name: RuboCop + +on: + push: + pull_request: + +jobs: + rubocop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.4' + bundler-cache: true + - name: Run RuboCop + run: bundle exec rubocop diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bb04a94 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: Test + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['3.4'] + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Run tests + run: bundle exec rspec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 554f812..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -rvm: - - 2.5.3 - -before_script: - - bundle exec danger diff --git a/CHANGELOG.md b/CHANGELOG.md index 7440e64..d82f97a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### 0.5.1 (Next) +* [#45](https://github.com/dblock/fui/pull/45): Migrated from Travis CI to GitHub Actions with danger-pr-comment workflow - [@dblock](https://github.com/dblock). * Your contribution here. ### 0.5.0 (2018/12/19) diff --git a/Dangerfile b/Dangerfile index a4bc93d..532532a 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,2 +1,4 @@ -toc.check -changelog.check +danger.import_dangerfile(gem: 'danger-pr-comment') + +changelog.check! +toc.check! diff --git a/Gemfile b/Gemfile index 9d04364..add6f9d 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,10 @@ source 'http://rubygems.org' gemspec -gem 'danger-changelog', '~> 0.4.0' -gem 'danger-toc', '~> 0.1' +gem 'danger' +gem 'danger-changelog' +gem 'danger-pr-comment', '0.1.0' +gem 'danger-toc' gem 'rake' gem 'rspec', '~> 3.4.0' gem 'rubocop', '0.61.1' diff --git a/README.md b/README.md index a187f72..4408dfe 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Fui ========== [![Gem Version](https://badge.fury.io/rb/fui.svg)](https://badge.fury.io/rb/fui) -[![Build Status](https://travis-ci.org/dblock/fui.svg)](https://travis-ci.org/dblock/fui) +[![Test](https://github.com/dblock/fui/actions/workflows/test.yml/badge.svg)](https://github.com/dblock/fui/actions/workflows/test.yml) Find unused Objective-C imports.