-
Notifications
You must be signed in to change notification settings - Fork 79
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
Use GitHub Actions for CI testing #178
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4247581
Add a GitHub Action workflow for CI
enkessler 8dc3cfe
Fix a typo
enkessler b77a958
Switch code coverage tool
enkessler 19ecd8b
Merge branch 'master' into use_github_actions
enkessler 65b31bd
Add environmental variables to CI
enkessler c923581
Try to add JRuby and Rubinius
enkessler fe96bc5
Update code coverage result set name
enkessler d5ba366
Remove Rubinius testing
enkessler fcd1a97
Trying to get JRuby to work
enkessler b506920
Revert "Merge branch 'master' into use_github_actions"
enkessler d5a6979
Remove a bad build combination
enkessler adf0f1a
Fix CI config file syntax
enkessler d8cc6e5
Still fixing that syntax
enkessler c144a53
Add more CI triggers
enkessler 69b2f1d
Revert "Revert "Merge branch 'master' into use_github_actions""
enkessler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: CI | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 1 * *' # Monthly | ||
|
||
env: | ||
CHILDPROCESS_UNSET: should-be-unset | ||
|
||
jobs: | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0', jruby-9.2] | ||
posix_spawn: [true, false] | ||
exclude: | ||
# The action used seems to not fully support JRuby on Windows | ||
- os: windows-latest | ||
ruby-version: jruby-9.2 | ||
|
||
runs-on: ${{ matrix.os }} | ||
env: | ||
CHILDPROCESS_POSIX_SPAWN: ${{ matrix.posix_spawn }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- name: Run Tests | ||
run: bundle exec rake spec | ||
- name: Push code coverage to Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
path-to-lcov: "./coverage/lcov/lcov.info" | ||
parallel: true | ||
flag-name: run-${{ matrix.os }}-${{ matrix.ruby-version }}-${{ matrix.posix_spawn }} | ||
|
||
test_finish: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel-finished: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'simplecov-lcov' | ||
|
||
|
||
SimpleCov::Formatter::LcovFormatter.config do |config| | ||
config.report_with_single_file = true | ||
config.lcov_file_name = 'lcov.info' | ||
end | ||
|
||
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([SimpleCov::Formatter::HTMLFormatter, | ||
SimpleCov::Formatter::LcovFormatter]) | ||
|
||
SimpleCov.start do | ||
root __dir__ | ||
merge_timeout 300 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What's the issue? The seems to imply it's an issue of ruby/setup-ruby, but I don't know of any.
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 think that that build combination just hung forever trying to even start up. No getting to the tests and failing just a lot of "why is this job still spinning and having no output after over an hour?". Although, now that I go back and look at the cancelled build in order to link it, it now has output. Still took me killing the process for that to happen, though.
https://github.com/enkessler/childprocess/runs/2755087269?check_suite_focus=true
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.
That seems a bug of GitHub Actions then, nothing to with
ruby/setup-ruby
(which I guess is meant byThe action
).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.
A bit odd that a GitHub Action bug would only appear for JRuby but not for the other flavors, given that they all use the same underlying action. That could be the case, though.
Regardless, I just chucked it into the "stuff that I'm not going to worry about right now" bucket because there was no obvious reason for it to not work, that action not necessarily working for JRuby+Windows is a known issue, and not having JRuby + Windows build combination wasn't any worse than our current CI situation. If you want to try throwing JRuby back into the mix and seeing what happens, feel free to do so.
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.
Yeah, it's probably fine to ignore for now.
What I meant as a ruby/setup-ruby maintainer is I believe this issue has nothing to do with ruby/setup-ruby.
I guess it's either a bug of JRuby on Windows (e.g., the issue you linked), or of GitHub Actions.
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.
Oh. In that case, yeah, you'd have a better idea than most what the problem might be. ;)
Hello famous person. waves