umts / microservices-engine

Rails engine for attaching to our microservices and handling inter-service communication.
MIT License
0 stars 1 forks source link

Travis appraisal #52

Closed Anbranin closed 7 years ago

Anbranin commented 7 years ago

I mean don't merge this, but I could use some input. Please for the love of God help me.

ennukee commented 7 years ago

😱

Anbranin commented 7 years ago

Yeah I realize that now. I also realize I should have realized it was obvious that I was accessing the file correctly given that a 'permission denied' error occurred earlier. I cannot tell if Travis is actually running the script, though, since I see no output. Am I supposed to? I made, as you can see, a test script that just echos. If it's getting run, should I see it in the build log, or is it normal that I don't? I've read the entire first page of several Google searches and it appears I'm doing this correctly. If I am and the scripts are indeed just getting silently run, then the problem lies in, perhaps, the placement of the script, or the migration not getting run correctly or in the right spot, or any number of things. It's just frustrating running a migration and then being told I need to run a migration.

werebus commented 7 years ago

So 3 things to mention, as there appears to be a bit on confusion here.

  1. You don't need to change the file mode (chmod) every Travis run. The script can just be executable in the git repository. Git tracks file permissions too, so just chmod it on your computer and commit that.
  2. You have to actually execute the script. Something like
    before_script:
      - scripts/test.sh
  3. You shouldn't have both a set of environment variables and a set of gemfiles. As it stands right now, your matrix is 2×3×3 (18 jobs before exclusions) and includes, for example, this one:
    {
      "language": "ruby",
      "rvm": "2.3.1",
      "env": "RAILS_VERSION=4",
      "gemfile": "gemfiles/rails_5.gemfile",
    }
werebus commented 7 years ago

Oh, and as far as whether to place your stuff in script or before_script:

before_script is part of the setup - it's stuff that needs to happen before we can even begin to test our software. If anything fails in that step, the build halts as an error becuase we can't run our tests.

script actually is the test step - it's stuff that determines whether our tests currently pass. If anything fails in that step, the build continues (so we can see everything that's wrong), but the build will be a failure.

werebus commented 7 years ago

all the keys are strings now due to syntax change

This seems incorrect. That is, I don't think you should change the behavior of the application to accommodate an old version of ruby. As a reminder, the following are all hashes with symbols for keys:

# The *only* valid syntaxes in ruby 1.8.7
{ :key => 'value' }
{ :'key' => 'value' }
# Also valid in ruby 1.9+
{ key: 'value' }
# Also valid in ruby 2.2+
{ 'key': 'value' }
dfaulken commented 7 years ago

@Anbranin, can we close?

Anbranin commented 7 years ago

UGh yes