Skip to content
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

GitHub Actions #216

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

GitHub Actions #216

wants to merge 9 commits into from

Conversation

Dakurei
Copy link
Contributor

@Dakurei Dakurei commented Apr 24, 2023

Summary

This pull request originally had the sole purpose of replacing CircleCI with Github Actions.

But also contains a bug fix.


Added

  • Add workflows github-pages, rspec, rubocop & yard

github-pages, rubocop & yard are executed on Ruby 2.7 environment
rspec is executed on Ruby 2.7, 3.0, 3.1, 3.2 and 3.3 environments
All workflows are executed on push main & pull_request main (except github-pages only on push main or push any tags beginning by 'v')
image

Changed

  • Modification of the README

Added new badges for Github Actions
Displaying the indication to use the main branch in the Gemfile (based on the Discord message)
Change links after bump gem version (3.4.0 -> 3.5.0)

  • Modification of gemspecs

Constraint on Redcarpet modified (from ~>3.5.0 to ~>3.6.0)
Constraint on Rspec modified (from ~>3.11.0 to ~>3.12.0)
Constraint on Rubocop modified (from ~>1.36.0 to ~>1.48.0)
Constraint on Simplecov modified (from ~>0.21.0 to ~>0.22.0)

  • Cancellation of a previous modification concerning webhooks that is not necessary

The new version of rspec was more verbose about this error, and concluded that PixeLInc's PR #199 fix was correct on this point
examples/webhooks.rb
lib/discordrb/data/webhook.rb
spec/data/webhook_spec.rb

Removed

  • CircleCI config

Fixed

  • Fix a bug in update_channel_data

Contrary to what the documentation for Channel#permission_overwrites= indicated, it was not possible to provide an Array<Overwrite>
The method has been modified to accept both Array<Overwrite> & Hash<Integer => Overwrite> (in order to not break the previous functioning), and the doc changed accordingly
Added an example file to test the overwrites (used as a quick help to my debugging mainly), and modified a test in due to this correction
lib/discordrb/data/channel.rb
spec/data/channel_spec.rb
examples/channel_overwrite.rb
image

@Daniel-Worrall
Copy link
Member

Love the work that's gone into this - Can we split it into 2 separate PRs though?

We can have the Drop 2.7 based on the Actions PR if that makes things easier

@Dakurei
Copy link
Contributor Author

Dakurei commented Apr 24, 2023

Yes I can do that, no worries 👍

@Dakurei Dakurei mentioned this pull request Apr 24, 2023
@Dakurei Dakurei changed the title GitHub Actions & Drop Ruby 2.7 GitHub Actions Apr 24, 2023
@Dakurei
Copy link
Contributor Author

Dakurei commented Apr 24, 2023

PR separated 👍

Copy link
Member

@PanisSupraOmnia PanisSupraOmnia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple minor things I'm seeing, otherwise LGTM

.github/workflows/github-pages.yml Outdated Show resolved Hide resolved
.github/workflows/rspec.yml Outdated Show resolved Hide resolved
.github/workflows/rspec.yml Outdated Show resolved Hide resolved
.github/workflows/rspec.yml Outdated Show resolved Hide resolved
.github/workflows/rspec.yml Outdated Show resolved Hide resolved
.github/workflows/rubocop.yml Outdated Show resolved Hide resolved
.github/workflows/rubocop.yml Outdated Show resolved Hide resolved
.github/workflows/rubocop.yml Outdated Show resolved Hide resolved
.github/workflows/yard.yml Outdated Show resolved Hide resolved
spec/data/channel_spec.rb Show resolved Hide resolved
Copy link
Member

@PanisSupraOmnia PanisSupraOmnia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Dakurei Dakurei force-pushed the github_actions branch 2 times, most recently from adc301d to 11e9dbb Compare June 28, 2023 19:49
@Daniel-Worrall Daniel-Worrall linked an issue Sep 22, 2023 that may be closed by this pull request
Dakurei and others added 9 commits January 8, 2024 21:25
  + Rspec tasks (for Ruby 2.7.x, 3.0.x, 3.1.x, 3.2.x)
  + Rubocop task (with Ruby 2.7.x)
  + Yard & Github pages tasks (with Ruby 2.7.x)

  + Update rspec version constraint in discordrb.gemspec (from ~> 3.11.0 to ~> 3.12.0)
  + Update redcarpet version constraint in discordrb.gemspec (from ~> 3.5.0 to ~> 3.6.0)
  Finally, after doing my tests on the latest version of Rspec, and looking at the code, I realize that the modification was not necessary, and PixeLInc was right in his PR shardlab#199
  Contrary to what the documentation indicated, it was not possible to provide an Array<Overwrite> to Channel#permission_overwrites=

  It was necessary to provide the Hash similar to what the method Channel#permission_overwrites returns

  + Added an example file to test the overwrites (I used it as a debug)
  + Modification of a test in spec/data/channel_spec.rb following this correction
Fix typo and newlines

Co-authored-by: Adrien Smith <adrien@panissupraomnia.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect link in README.md
3 participants