Skip to content

Use Github Actions #504

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

Merged
merged 20 commits into from
Oct 15, 2022
Merged

Use Github Actions #504

merged 20 commits into from
Oct 15, 2022

Conversation

Judahmeek
Copy link
Collaborator

@Judahmeek Judahmeek commented Sep 22, 2022

This PR makes a number of changes, both to use Github Actions for CI & to get all specs passing in CI.

This change is Reviewable

@Judahmeek Judahmeek force-pushed the judahmeek/github-actions branch from e3355ac to 9ea4512 Compare September 22, 2022 19:02
@Judahmeek Judahmeek force-pushed the judahmeek/github-actions branch from b3846c8 to e391207 Compare September 29, 2022 02:36
@Judahmeek Judahmeek force-pushed the judahmeek/github-actions branch from 1ff201e to b9b6f00 Compare September 30, 2022 04:33
@Judahmeek Judahmeek force-pushed the judahmeek/github-actions branch from b9b6f00 to 94fc210 Compare September 30, 2022 04:50
@Judahmeek Judahmeek force-pushed the judahmeek/github-actions branch from 0c81396 to d8b03d8 Compare September 30, 2022 05:28
@Judahmeek Judahmeek changed the title Create test.yml Use Github Actions Oct 11, 2022
Copy link
Collaborator Author

@Judahmeek Judahmeek left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 22 files reviewed, 8 unresolved discussions


Gemfile line 46 at r1 (raw file):

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# mini_racer is probably faster than therubyracer
gem "mini_racer", platforms: :ruby

Removed as a dependency because of shakacode/react_on_rails#1453


Gemfile line 96 at r1 (raw file):

  gem "capybara"
  gem "capybara-screenshot"
  gem 'coveralls_reborn', '~> 0.25.0', require: false

coveralls is no longer maintained, so this is the new recommended fork.


package.json line 94 at r1 (raw file):

    "babel-eslint": "^8.0.2",
    "babel-jest": "^23.4.2",
    "babel-loader": "^8.2.3",

redundant


app/views/comments/index.html.erb line 27 at r1 (raw file):

        <td><%= link_to 'Edit', edit_comment_path(comment) %></td>
      </tr>
      <tr>

These changes weren't essential, but does create a better layout.


client/app/bundles/comments/startup/NavigationBarApp.jsx line 26 at r1 (raw file):

    store = ReactOnRails.getStore('commentsStore', false);
  } else {
    return () => <NavigationBar {...{ pathname }} />;

This was the actual problem I was trying to fix with the changes to comments/startup files.

I could probably remove the other changes if you'd prefer that.


client/app/packs/bootstrap.js line 1 at r1 (raw file):

import 'bootstrap-loader';

This pack was not used by any of the views.


client/app/packs/client-bundle.js line 3 at r1 (raw file):

import ReactOnRails from 'react-on-rails';
import 'bootstrap-loader';
import 'expose-loader?exposes=$,jQuery!jquery';

It took me way longer than it should have to figure out this line was necessary in order to get destroy_comment_spec to pass.


spec/system/add_new_comment_spec.rb line 3 at r1 (raw file):

# frozen_string_literal: true

require "rails_helper"

The specs structure was severely outdated so there are a lot of changes structure-wise although the commands/steps remain the same.

Copy link
Collaborator Author

@Judahmeek Judahmeek left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 22 files reviewed, 8 unresolved discussions


spec/system/add_new_comment_spec.rb line 3 at r1 (raw file):

Previously, Judahmeek (Judah Meek) wrote…

The specs structure was severely outdated so there are a lot of changes structure-wise although the commands/steps remain the same.

The specs can be likely be DRYed up, just not through shared_contexts anymore.

@Judahmeek Judahmeek merged commit c56f052 into master Oct 15, 2022
@Judahmeek Judahmeek deleted the judahmeek/github-actions branch October 15, 2022 22:40
@Judahmeek Judahmeek mentioned this pull request Oct 19, 2022
@Judahmeek
Copy link
Collaborator Author

Note to self: jQuery is required for jquery_ujs, which is required because the destroy_comment_spec is testing a rails view, which deletes the CSS with jquery_ujs. Probably would be cleaner to remove jQuery, jquery_ujs, and just check for the comment details instead of the CSS.

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.

1 participant