8000 Port tests over to GitHub Actions by neko314 · Pull Request #1724 · codetriage/CodeTriage · GitHub
[go: up one dir, main page]

Skip to content

Port tests over to GitHub Actions #1724

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 1 commit into from
Oct 18, 2022

Conversation

neko314
Copy link
Contributor
@neko314 neko314 commented Oct 15, 2022

Set up GitHub Actions to run tests to check the PRs on GitHub.

Description

I add YAML file to define workflow.

Related Issue

#1685

Motivation and Context

CI will help maintainer, contributors and users of CodeTriage to know the code work well, or alert soon when something is broken.

How Has This Been Tested?

I created the same PR to another forked repo ( gregmolnar#1 ), and run CI.
GitHub actions are triggered by pushing, and all jobs are success.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@neko314 neko314 force-pushed the port-tests-to-gh-actions branch 2 times, most recently from 9560ec7 to bd14aeb Compare October 15, 2022 08:28
@neko314 neko314 marked this pull request as ready for review October 15, 2022 08:28
@neko314 neko314 changed the title [WIP] Port tests over to GitHub Actions Port tests over to GitHub Actions Oct 15, 2022
@gregmolnar
Copy link
Contributor

@schneems I think you need to allow the checks to be run.

@neko314 neko314 force-pushed the port-tests-to-gh-actions branch 8 times, most recently from c9aa0ad to cf6f011 Compare October 15, 2022 09:22
@neko314
Copy link
Contributor Author
neko314 commented Oct 15, 2022

When I gain permission to run CI, it's found that CI fails on this PR gregmolnar#1 with @gregmolnar.

I need keep trying to accomplish set up. @gregmolnar will help me in need. Thank you 😄
This PR is open but not be finished. I'll mention when I finish it.

@schneems Anyway please allow the checks to be run👍

@neko314 neko314 force-pushed the port-tests-to-gh-actions branch 3 times, most recently from b8e9389 to ef83527 Compare October 16, 2022 02:47
@schneems
Copy link
Member

This is really exciting. Thank you for working on this!

I'm not actually sure how to do that. I don't have any options in the UI. I think because there's not an existing GitHub action in the project, it's not triggering for you to add one.

image

I see two options for moving forward: I can just merge this as is, and then you can fix it up if there are any errors or bugs. Alternatively, I could merge in an empty (or close to empty) GitHub action and see if that allows me to approve your CI run. The downside of that option is it would probably result in merge conflicts for you.

I don't know if @deepakmahakale has some suggestions or ideas.

@neko314
Copy link
Contributor Author
neko314 commented Oct 17, 2022

@schneems

Thank you so much for your comment and advices to go forward!

I'm not actually sure how to do that. I don't have any options in the UI. I think because there's not an existing GitHub action in the project, it's not triggering for you to add one.

Do you see 'settings' tab on this repo page?
You might be change any setting at Settings > Actions > general > Fork pull request workflows from outside collaborators . (Maybe, I just guess.)
image

I can just merge this as is, and then you can fix it up if there are any errors or bugs.

I agree this way. If you so, I'll the commits get into one before you merge.
I already know all tests pass with Ruby 3.0 and 3.1 but some fails with 2.7 like this. I think this failures are because of keyword arguments. I haven't fixed and don't know how to fix it yet but I'll keep going on.

@neko314 neko314 force-pushed the port-tests-to-gh-actions branch from 3828b0d to e983139 Compare October 17, 2022 04:48
@deepakmahakale
8000 Copy link
Member

Yes, @neko314 is correct.
Found this article that says the same - https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#controlling-changes-from-forks-to-workflows-in-public-repositories

By default, all first-time contributors require approval to run workflows.

@schneems
Copy link
Member
schneems commented Oct 17, 2022

I already know all tests pass with Ruby 3.0 and 3.1 but some fails with 2.7

We can bump the minimum Ruby version in the Gemfile instead. I don’t need to support running this under 2.7.

The ruby versions are flexible to make testing with newer Ruby versions easier. It really only needs to run on the Ruby version in the Gemfile.lock

@gregmolnar
Copy link
Contributor

@schneems once Ruby 2.7 is removed from the test matrix, you can just merge the PR and the checks will run.

@neko314
Copy link
Contributor Author
neko314 commented Oct 18, 2022

Thanks everyone!

I'll remove 2.7 from matrix, beautify commits, then this PR will actually be almost accomplished.

Co-authored-by: gregmolnar <molnargerg@gmail.com>
@neko314 neko314 force-pushed the port-tests-to-gh-actions branch from f5e96d9 to f4751a3 Compare October 18, 2022 00:54
@neko314 neko314 changed the title Port tests over to GitHub Actions Run tests by GitHub Actions Oct 18, 2022
@neko314 neko314 changed the title Run tests by GitHub Actions Port tests over to GitHub Actions Oct 18, 2022
@neko314
Copy link
Contributor Author
neko314 commented Oct 18, 2022

@schneems

I'll remove 2.7 from matrix, beautify commits, then this PR will actually be almost accomplished.

I've done them and I reviewed these changes by my self.
Please review this PR again. Thank you in advance.

@neko314 neko314 closed this Oct 18, 2022
@neko314 neko314 reopened this Oct 18, 2022
@schneems schneems merged commit 02e1aab into codetriage:main Oct 18, 2022
@schneems
Copy link
Member

Thank you for your work here! Merging in 🚀

@neko314 neko314 deleted the port-tests-to-gh-actions branch October 19, 2022 00:51
@schneems
Copy link
Member

Btw looks like tests are firing just fine for me. Thanks for your work!

@mishina2228 mishina2228 mentioned this pull request Nov 6, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0