-
Notifications
You must be signed in to change notification settings - Fork 207
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
Migrate from Travis to GitHub Actions for CI #1534
Conversation
Thanks for opening this pull request! |
|
Code Climate has analyzed commit d83a53d and detected 0 issues on this pull request. View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## main #1534 +/- ##
==========================================
- Coverage 72.98% 72.33% -0.65%
==========================================
Files 40 40
Lines 1399 1406 +7
==========================================
- Hits 1021 1017 -4
- Misses 378 389 +11
|
Ok, at least tests are running now, but with errors:
In unit tests:
In system tests:
|
Hhhmmm I'm getting this error despite this gem not being inherited anywhere 🤔
|
Now I'm seeing:
Weird...I can't see anything like "Style/VariableName" inside |
@@ -15,7 +15,7 @@ AllCops: | |||
- '/Rakefile' | |||
- '/config.ru' | |||
Exclude: | |||
- 'vendor/*' | |||
- 'vendor/**/*' |
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.
This line did the trick!
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.
Except that I know have errors in code climate 🌦️
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.
oof wow that was obscure! Glad you're figuring it out though!
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.
Hmm, i see:
We had trouble running the rubocop engine.
The engine's output shown below may indicate the cause of the error.
If not, please contact us so we can investigate further.
.rubocop.yml: `require` is concealed by duplicate
/usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:196:in `rescue in gem_config_path': Unable to find gem rubocop-shopify; is the gem installed? Gem::MissingSpecError (Gem::LoadError)
from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:192:in `gem_config_path'
from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:48:in `block (2 levels) in resolve_inheritance_from_gems'
from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:46:in `reverse_each'
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.
Isn't CodeClimate just running rubocop? So maybe we just need one or the other. Rubocop's job ran fine!
32 files inspected, no offenses detected
Gosh surprising that this is a lot more complex seeming than our other Rails repos. I guess the setup is relatively different?
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.
You're right, I removed the rubocop plugin from codeclimate as it is in GH Actions now.
I get this error in step 6 of development dockerfile:
|
@jywarren any idea on how to go about the codecov failures? Apart from that, all the other jobs are successful 🎉 Thanks!! |
OK!!! So i think we could ignore the patch codecov because it's just saying that only 61% of your newly added/changed code is covered, which makes sense because you haven't really touched much testable code. The project one, well, we dropped below the 1% change (delta) threshold, which is supposed to ensure no PR lowers coverage by more than 1%. Again i think we can bypass that because it's clear we're not adding code that's really covered by a test suite. So I'm going to change the job names a little bit for style/friendliness and to match plots2 if I can, but otherwise this looks good! |
@@ -3,7 +3,7 @@ class ConcurrentEditingChannel < ApplicationCable::Channel | |||
|
|||
def subscribed | |||
# Called first to connect user to the channel. | |||
stream_from "concurrent_editing_channel:#{params[:mapSlug]}" | |||
stream_from("concurrent_editing_channel:#{params[:mapSlug]}") |
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.
Were these changes from Rubocop telling you how it should be formatted? I think that's outside the scope of this PR ideally... it's fine that it's included but I'm sorry I should have caught this and made it clear you don't have to fix everyone else's syntax! Thank you though!!!
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.
Yep, the reason for those changes is that while I was setting up the Rubocop job I ran into lots of errors as you can see by the commit history... In my attempts to make this work, I changed the setup of the linter a bit (like adding the style guide as a gem instead of requiring it as a static file). After I made those changes, I had to run Rubocop again so it wouldn't fail due to linter offenses.
@@ -51,6 +51,7 @@ RUN git config --global url."https://".insteadOf git:// | |||
COPY . /app/ | |||
WORKDIR /app | |||
|
|||
RUN gem install bundler |
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.
aha!
@@ -41,6 +41,6 @@ WORKDIR /app | |||
RUN apt-get clean && \ | |||
apt-get autoremove -y | |||
|
|||
RUN bundle install | |||
RUN gem install bundler && bundle install |
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.
ok!
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.
So, is it possible to move these development
and production
dockerfiles into a folder called dockerfiles
or something? They're just a little mysterious sitting in the root folder. I don't recall we have them this way in plots2- but for comparison i think we have docker compose files in this directory:
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.
I made some code suggestions for dockerfile/development
etc below which you can accept, then we just need to move the files themselves. Almost there!!!
.github/workflows/tests.yml
Outdated
name: system-test-screenshots | ||
path: tmp/screenshots/* | ||
|
||
docker-development: |
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.
Can we rename this? What is its role? It looks good but even familiar with MapKnitter and docker, it's not super clear what the purpose of this job is, so i wonder if we could explain it a bit using the name? Thanks @aliciapaz!!!
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.
Hmm, could it be development-docker-build
and production-docker-build
?
From what I understand, these jobs ensure that changes made to the source code do not break those docker builds. Does that make sense?
Thank you @jywarren!
.github/workflows/tests.yml
Outdated
bundler-cache: true | ||
- uses: ./.github/actions/setup-test-environment | ||
- name: 'Development Docker Build' | ||
run: docker build -t mapknitter -f production . |
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.
run: docker build -t mapknitter -f production . | |
run: docker build -t mapknitter -f dockerfiles/production . |
Awesome. Even "docker-build-check-development"?
…On Tue, Sep 14, 2021, 5:50 PM Alicia Paz ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .github/workflows/tests.yml
<#1534 (comment)>:
> + RAILS_ENV: test
+ DB_PASSWORD: root
+ DB_PORT: ${{ job.services.mysql.ports[3306] }}
+ REDIS_HOST: localhost
+ REDIS_PORT: 6379
+ run: |
+ export DISPLAY=:99
+ chromedriver --url-base=/wd/hub &
+ bundle exec rails test test:system
+ - name: Archive system test screenshots
+ uses: ***@***.***
+ with:
+ name: system-test-screenshots
+ path: tmp/screenshots/*
+
+ docker-development:
Hmm, could it be development-docker-build and production-docker-build?
From what I understand, these jobs ensure that changes made to the source
code do not break those docker builds. Does that make sense?
Thank you @jywarren <https://github.com/jywarren>!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1534 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J64XFZHJF77PPX3Q63UB67SZANCNFSM5CVYHSVA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Wooohoo!!!!!! Great work @aliciapaz !!!!!! |
Fixes #1489
Based on #1491 and publiclab/spectral-workbench#647
Jobs to perform in CI/CD Pipeline based on Travis.yml: