-
-
Notifications
You must be signed in to change notification settings - Fork 180
Migrate from Travis CI to GitHub Actions with danger-pr-comment workflow. #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| toc.check | ||
| changelog.check | ||
| danger.import_dangerfile(gem: 'danger-pr-comment') | ||
|
|
||
| changelog.check! | ||
| toc.check! |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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' | ||||||||||||||
|
Comment on lines
+6
to
+8
|
||||||||||||||
| gem 'danger-changelog' | |
| gem 'danger-pr-comment', '0.1.0' | |
| gem 'danger-toc' | |
| gem 'danger-changelog', '~> 0.4.0' | |
| gem 'danger-pr-comment', '0.1.0' | |
| gem 'danger-toc', '~> 0.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'danger' gem is added without a version constraint. Consider adding a version constraint for better dependency management and reproducibility, similar to how other gems in the Gemfile specify versions (e.g., 'rspec', 'rubocop').