Skip to content
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

Move from circleci to gh actions for backend tests #2927

Merged
merged 22 commits into from Jan 18, 2023

Conversation

freddyaboulton
Copy link
Collaborator

@freddyaboulton freddyaboulton commented Jan 4, 2023

Description

Remove circle ci and use github actions instead

Checklist:

  • I have performed a self-review of my own code
  • I have added a short summary of my change to the CHANGELOG.md
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

A note about the CHANGELOG

Hello 👋 and thank you for contributing to Gradio!

All pull requests must update the change log located in CHANGELOG.md, unless the pull request is labeled with the "no-changelog-update" label.

Please add a brief summary of the change to the Upcoming Release > Full Changelog section of the CHANGELOG.md file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by [@myusername](link-to-your-github-profile) in [PR 11111](https://github.com/gradio-app/gradio/pull/11111)".

If you would like to elaborate on your change further, feel free to include a longer explanation in the other sections.
If you would like an image/gif/video showcasing your feature, it may be best to edit the CHANGELOG file using the
GitHub web UI since that lets you upload files directly via drag-and-drop.

@gradio-pr-bot
Copy link
Contributor

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2927-all-demos

Comment on lines +26 to +28
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add cache: 'pip' here to cache the project dependencies? They don't change as frequently as we build in CI and it should speed up install times significantly if we get the caching right.

According to the docs it should use the requirements.txt to decide when to bust that cache. We may need to pin to specific version of the dependencies in order for this to work properly but we should do that anyway as it is a good practice for managing dependencies.

@freddyaboulton
Copy link
Collaborator Author

@pngwn I added the cache logic! Installing the python deps now takes ~20 seconds as opposed to 2 minutes

image

Comment on lines 9 to 11
concurrency:
group: backend-${{ github.ref }}-${{ github.event_name == 'push' || github.event.inputs.fire != null }}
cancel-in-progress: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm, what this does is cancel the existing GH action that is in progress if someone pushes again to the same branch? We didn't do this for Circle CI so that it would be easier to trace a failure to a specific commit. I think we should keep that behavior

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! Will set to False.

Copy link
Member

@abidlabs abidlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this switch @freddyaboulton! LGTM, see one comment above.

@freddyaboulton freddyaboulton merged commit 0091b36 into main Jan 18, 2023
@freddyaboulton freddyaboulton deleted the move-from-circleci-to-gh-actions branch January 18, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants