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

Add earlgrey_gem.yml & Fix rubocop #671

Merged
merged 1 commit into from Mar 10, 2018

Conversation

Projects
None yet
5 participants
@bootstraponline
Contributor

bootstraponline commented Jan 12, 2018

Update Ruby version requirement to 2.1 (Rubocop dropped 2.0). Both 2.0 and 2.1 are end of life Ruby versions.

Fix #668

@googlebot googlebot added the cla: yes label Jan 12, 2018

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Jan 12, 2018

Contributor

image
Ruby job passed on Travis.

Contributor

bootstraponline commented Jan 12, 2018

image
Ruby job passed on Travis.

@khandpur khandpur requested a review from wuhao5 Jan 28, 2018

@khandpur

This comment has been minimized.

Show comment
Hide comment
@khandpur

khandpur Jan 28, 2018

Collaborator

@wuhao5 could you please review this?

Collaborator

khandpur commented Jan 28, 2018

@wuhao5 could you please review this?

Show outdated Hide outdated gem/spec/fixtures/earlgrey_yaml/earlgrey_gem.yml Outdated
Metrics/LineLength:
Max: 100
Max: 130

This comment has been minimized.

@wuhao5

wuhao5 Feb 6, 2018

Collaborator

is this only for not breaking the one liner?

@wuhao5

wuhao5 Feb 6, 2018

Collaborator

is this only for not breaking the one liner?

This comment has been minimized.

@bootstraponline

bootstraponline Feb 7, 2018

Contributor

100 is too small.

Offenses:

Demo/EarlGreyExample/Podfile:23:8: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
target "EarlGreyExampleTests" do
       ^^^^^^^^^^^^^^^^^^^^^^
Demo/EarlGreyExample/Podfile:30:8: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
target "EarlGreyExampleSwiftTests" do
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Demo/EarlGreyExample/Podfile:36:1: C: Layout/TrailingBlankLines: 1 trailing blank lines detected.
gem/spec/earlgrey_yaml_spec.rb:6:101: C: Metrics/LineLength: Line is too long. [105/100]
    allow(podfile).to receive(:defined_in_file) { File.join(__dir__, '/fixtures/earlgrey_yaml/Podfile') }
                                                                                                    ^^^^^
gem/lib/earlgrey/cli.rb:24:101: C: Metrics/LineLength: Line is too long. [110/100]
    method_option :scheme,  aliases: '-s', type: :string, required: false, desc: 'EarlGreyTestTarget.xcscheme'
                                                                                                    ^^^^^^^^^^
gem/lib/earlgrey/extensions/analyzer_extensions.rb:35:101: C: Metrics/LineLength: Line is too long. [119/100]
          EarlGrey.add_earlgrey_copy_files_script native_target, framework_ref if config[EarlGreyYaml::ADD_BUILD_PHASE]
                                                                                                    ^^^^^^^^^^^^^^^^^^^
gem/lib/earlgrey/extensions/analyzer_extensions.rb:36:101: C: Metrics/LineLength: Line is too long. [109/100]
          EarlGrey.add_earlgrey_framework native_target, framework_ref if config[EarlGreyYaml::ADD_FRAMEWORK]
                                                                                                    ^^^^^^^^^
gem/lib/earlgrey/extensions/earlgrey_yaml.rb:19:101: C: Metrics/LineLength: Line is too long. [116/100]
    abort "ERROR: earlgrey_gem.yml references missing targets: #{missing_targets}".red unless missing_targets.empty?
                                                                                                    ^^^^^^^^^^^^^^^^
gem/lib/earlgrey/extensions/earlgrey_yaml.rb:30:101: C: Metrics/LineLength: Line is too long. [105/100]
    abort "ERROR: earlgrey_gem.yml contains unknown keys: #{unknown_keys}".red unless unknown_keys.empty?
                                                                                                    ^^^^^
gem/lib/earlgrey/configure_earlgrey.rb:319:101: C: Metrics/LineLength: Line is too long. [129/100]
        settings[HEADER_SEARCH_PATHS] << CARTHAGE_HEADERS_IOS unless settings[HEADER_SEARCH_PATHS].include?(CARTHAGE_HEADERS_IOS)
                                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gem/lib/earlgrey/configure_earlgrey.rb:345:101: C: Metrics/LineLength: Line is too long. [127/100]
      target.frameworks_build_phase.add_file_reference framework_ref, true unless linked_frameworks.include? EARLGREY_FRAMEWORK
                                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
gem/lib/earlgrey/configure_earlgrey.rb:384:101: C: Metrics/LineLength: Line is too long. [107/100]
        raise "Unable to locate #{swift_fallback} file at path #{src_swift}." unless File.exist?(src_swift)
                                                                                                    ^^^^^^^
@bootstraponline

bootstraponline Feb 7, 2018

Contributor

100 is too small.

Offenses:

Demo/EarlGreyExample/Podfile:23:8: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
target "EarlGreyExampleTests" do
       ^^^^^^^^^^^^^^^^^^^^^^
Demo/EarlGreyExample/Podfile:30:8: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
target "EarlGreyExampleSwiftTests" do
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Demo/EarlGreyExample/Podfile:36:1: C: Layout/TrailingBlankLines: 1 trailing blank lines detected.
gem/spec/earlgrey_yaml_spec.rb:6:101: C: Metrics/LineLength: Line is too long. [105/100]
    allow(podfile).to receive(:defined_in_file) { File.join(__dir__, '/fixtures/earlgrey_yaml/Podfile') }
                                                                                                    ^^^^^
gem/lib/earlgrey/cli.rb:24:101: C: Metrics/LineLength: Line is too long. [110/100]
    method_option :scheme,  aliases: '-s', type: :string, required: false, desc: 'EarlGreyTestTarget.xcscheme'
                                                                                                    ^^^^^^^^^^
gem/lib/earlgrey/extensions/analyzer_extensions.rb:35:101: C: Metrics/LineLength: Line is too long. [119/100]
          EarlGrey.add_earlgrey_copy_files_script native_target, framework_ref if config[EarlGreyYaml::ADD_BUILD_PHASE]
                                                                                                    ^^^^^^^^^^^^^^^^^^^
gem/lib/earlgrey/extensions/analyzer_extensions.rb:36:101: C: Metrics/LineLength: Line is too long. [109/100]
          EarlGrey.add_earlgrey_framework native_target, framework_ref if config[EarlGreyYaml::ADD_FRAMEWORK]
                                                                                                    ^^^^^^^^^
gem/lib/earlgrey/extensions/earlgrey_yaml.rb:19:101: C: Metrics/LineLength: Line is too long. [116/100]
    abort "ERROR: earlgrey_gem.yml references missing targets: #{missing_targets}".red unless missing_targets.empty?
                                                                                                    ^^^^^^^^^^^^^^^^
gem/lib/earlgrey/extensions/earlgrey_yaml.rb:30:101: C: Metrics/LineLength: Line is too long. [105/100]
    abort "ERROR: earlgrey_gem.yml contains unknown keys: #{unknown_keys}".red unless unknown_keys.empty?
                                                                                                    ^^^^^
gem/lib/earlgrey/configure_earlgrey.rb:319:101: C: Metrics/LineLength: Line is too long. [129/100]
        settings[HEADER_SEARCH_PATHS] << CARTHAGE_HEADERS_IOS unless settings[HEADER_SEARCH_PATHS].include?(CARTHAGE_HEADERS_IOS)
                                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gem/lib/earlgrey/configure_earlgrey.rb:345:101: C: Metrics/LineLength: Line is too long. [127/100]
      target.frameworks_build_phase.add_file_reference framework_ref, true unless linked_frameworks.include? EARLGREY_FRAMEWORK
                                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
gem/lib/earlgrey/configure_earlgrey.rb:384:101: C: Metrics/LineLength: Line is too long. [107/100]
        raise "Unable to locate #{swift_fallback} file at path #{src_swift}." unless File.exist?(src_swift)
                                                                                                    ^^^^^^^
Show outdated Hide outdated gem/spec/fixtures/earlgrey_yaml/earlgrey_gem.yml Outdated
@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 7, 2018

Contributor

Thanks for the comments. I'll update the PR tomorrow.

Contributor

bootstraponline commented Feb 7, 2018

Thanks for the comments. I'll update the PR tomorrow.

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 7, 2018

Contributor

I've addressed all the comments. Let me know if there's any more feedback.

Contributor

bootstraponline commented Feb 7, 2018

I've addressed all the comments. Let me know if there's any more feedback.

@wuhao5

wuhao5 approved these changes Feb 7, 2018

LGTM, but could you add the doc before merging?

@@ -0,0 +1,4 @@
EarlGreyExampleSwiftTests:

This comment has been minimized.

@wuhao5

wuhao5 Feb 7, 2018

Collaborator

this is cool, didn't know about this setting, could you also update the doc?

@wuhao5

wuhao5 Feb 7, 2018

Collaborator

this is cool, didn't know about this setting, could you also update the doc?

This comment has been minimized.

@bootstraponline

bootstraponline Feb 7, 2018

Contributor

updated the readme

@bootstraponline

bootstraponline Feb 7, 2018

Contributor

updated the readme

@wuhao5

This comment has been minimized.

Show comment
Hide comment
@wuhao5

wuhao5 Feb 7, 2018

Collaborator

Thanks! @bootstraponline LGTM.

Collaborator

wuhao5 commented Feb 7, 2018

Thanks! @bootstraponline LGTM.

@wuhao5

This comment has been minimized.

Show comment
Hide comment
@wuhao5

wuhao5 Feb 8, 2018

Collaborator

@bootstraponline there is a travis failure, do you mind taking a look?

Collaborator

wuhao5 commented Feb 8, 2018

@bootstraponline there is a travis failure, do you mind taking a look?

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 8, 2018

Contributor

@bootstraponline there is a travis failure, do you mind taking a look

I think Travis itself is the failure. The CI setup we have for EarlGrey has been failing for years. I'm spending the majority of my time waiting for builds that don't run locally.

For an automation project, the CI shouldn't be such a mess with builds that can't run locally and a solid 0% pass rate.

The CI system needs to be replaced. The process for getting feedback and resolving issues is too slow.

Contributor

bootstraponline commented Feb 8, 2018

@bootstraponline there is a travis failure, do you mind taking a look

I think Travis itself is the failure. The CI setup we have for EarlGrey has been failing for years. I'm spending the majority of my time waiting for builds that don't run locally.

For an automation project, the CI shouldn't be such a mess with builds that can't run locally and a solid 0% pass rate.

The CI system needs to be replaced. The process for getting feedback and resolving issues is too slow.

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 8, 2018

Contributor

It looks like EarlGrey.swift isn't getting created.

Contributor

bootstraponline commented Feb 8, 2018

It looks like EarlGrey.swift isn't getting created.

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 8, 2018

Contributor

Issue should be fixed now.

Contributor

bootstraponline commented Feb 8, 2018

Issue should be fixed now.

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 8, 2018

Contributor

Error Domain=IDETestOperationsObserverErrorDomain Code=14 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at

https://travis-ci.org/google/EarlGrey/jobs/339106186

this seems like general flakiness? The demo Swift tests work locally.

Contributor

bootstraponline commented Feb 8, 2018

Error Domain=IDETestOperationsObserverErrorDomain Code=14 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at

https://travis-ci.org/google/EarlGrey/jobs/339106186

this seems like general flakiness? The demo Swift tests work locally.

@wuhao5

This comment has been minimized.

Show comment
Hide comment
@wuhao5

wuhao5 Feb 8, 2018

Collaborator

thanks @bootstraponline , I think you will need to sync up with the latest HEAD as there is some merges lately.

Collaborator

wuhao5 commented Feb 8, 2018

thanks @bootstraponline , I think you will need to sync up with the latest HEAD as there is some merges lately.

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 8, 2018

Contributor

I think you will need to sync up with the latest HEAD as there is some merges lately.

Edit: I rebased on origin and Travis is building again.

Contributor

bootstraponline commented Feb 8, 2018

I think you will need to sync up with the latest HEAD as there is some merges lately.

Edit: I rebased on origin and Travis is building again.

Add earlgrey_gem.yml & Fix rubocop
Check in Gemfile.lock for Travis CI

Use SampleEarlGreySwiftTests instead of TeacherUITests

Add earlgrey_gem.yml to EarlGreyExample

Fix earlgrey_yaml.rb

Fix rubocop

Add earlgrey_gem.yml to EarlGreyExample readme

Fix RSpec tests
@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 8, 2018

Contributor

Compiling�[0m EarlGrey.swift is failing. Pretty sure that has nothing to do with the Ruby 💎 .


The following build commands failed:

	CompileSwift normal x86_64 /Users/travis/build/google/EarlGrey/Demo/EarlGreyExample/EarlGreyExampleSwiftTests/EarlGrey.swift

	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compile
Contributor

bootstraponline commented Feb 8, 2018

Compiling�[0m EarlGrey.swift is failing. Pretty sure that has nothing to do with the Ruby 💎 .


The following build commands failed:

	CompileSwift normal x86_64 /Users/travis/build/google/EarlGrey/Demo/EarlGreyExample/EarlGreyExampleSwiftTests/EarlGrey.swift

	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compile
@tirodkar

This comment has been minimized.

Show comment
Hide comment
@tirodkar

tirodkar Feb 15, 2018

Collaborator

@bootstraponline know any reason why it might be failing? None of us seem to have seen it before either.

Collaborator

tirodkar commented Feb 15, 2018

@bootstraponline know any reason why it might be failing? None of us seem to have seen it before either.

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 15, 2018

Contributor

@bootstraponline know any reason why it might be failing? None of us seem to have seen it before either.

No idea... Travis seems like a lost cause. Appium recently moved to Circle CI. EarlGrey needs to move to something where we can easily reproduce failures locally to debug.

Contributor

bootstraponline commented Feb 15, 2018

@bootstraponline know any reason why it might be failing? None of us seem to have seen it before either.

No idea... Travis seems like a lost cause. Appium recently moved to Circle CI. EarlGrey needs to move to something where we can easily reproduce failures locally to debug.

@bootstraponline

This comment has been minimized.

Show comment
Hide comment
@bootstraponline

bootstraponline Feb 15, 2018

Contributor

Travis is failing right now on 100% of the EarlGrey open PRs. 😭

Contributor

bootstraponline commented Feb 15, 2018

Travis is failing right now on 100% of the EarlGrey open PRs. 😭

@tirodkar tirodkar merged commit 9669931 into google:master Mar 10, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
cla/google All necessary CLAs are signed

@bootstraponline bootstraponline deleted the bootstraponline:gem branch Mar 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment