openedx / xblock-image-explorer

GNU Affero General Public License v3.0
9 stars 39 forks source link

BB-1073: Set up CI tests #59

Closed giovannicimolin closed 5 years ago

giovannicimolin commented 5 years ago

This PR sets up CI tests for this repo. The checks ran with these checks are:

  1. Unit tests
  2. Code quality tests

Until we get a code code quality, we should leave only the unit test as required for merging.

Testing instructions:

  1. Check the tox and Travis configuration files.
  2. Test locally with tox:
    pip install tox
    tox
  3. Check if the CI tests container is green.

Reviewers:

openedx-webhooks commented 5 years ago

Thanks for the pull request, @giovannicimolin! I've created OSPR-3325 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams.

Feel free to add as much of the following information to the ticket:

All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here.

giovannicimolin commented 5 years ago

@natabene Can you enable CircleCI for this repo? I just realized that edx-solutions uses CircleCI and not Travis. You can do that here: https://circleci.com/add-projects/gh/edx-solutions.

Thanks!

natabene commented 5 years ago

@giovannicimolin here you go

natabene commented 5 years ago

@giovannicimolin Is this what you needed?

natabene commented 5 years ago

@giovannicimolin Actually, I am getting this in CircleCI: Service alert: Your project references CircleCI 1.0 or it has no configuration. CircleCI 1.0 and projects without configuration files are no longer supported. You must update your project to use CircleCI 2.0 configuration to continue. Learn more.

giovannicimolin commented 5 years ago

@natabene We're getting that because we don't have any configuration for Circle in the main repository yet. That should be fixed when this PR is merged.

I ended up missing a step in order to correctly configure CircleCI on this repo, we'll need to add a Deploy Key to this repository. This is the guide: https://developer.github.com/v3/guides/managing-deploy-keys/#setup-2. Feel free to ask any questions related to this, or maybe create a task for someone with admin access to the repo to set up.

For now, I added a personal access token from my account and the CI runs will work, but this is a temporary solution.

giovannicimolin commented 5 years ago

@xitij2000 This is ready for review.

giovannicimolin commented 5 years ago

@natabene Do you have any news on the repo configuration? Just so I can keep a tab on it and update the configuration when the deploy key is created.

natabene commented 5 years ago

https://developer.github.com/v3/guides/managing-deploy-keys/#setup-2

@feanil Is this something you would be able to help me with?

natabene commented 5 years ago

@giovannicimolin We are trying to figure this out, please stay tuned.

giovannicimolin commented 5 years ago

@natabene I'm keeping a tab on this. Ping me if you need any help :)

natabene commented 5 years ago

@giovannicimolin Do you still need this? If yes, it might be easier for you and me to set up a screensharing session to complete this.

xitij2000 commented 5 years ago

@natabene Yup, we'd still like to set up CI support for this and possibly other XBlocks. So would be nice to have a process in place for this. CC: @giovannicimolin

natabene commented 5 years ago

@xitij2000 Got it, do you think we can do a screen sharing session tomorrow? I might have the necessary access level, but not sure what the steps are. Maybe you can guide me.

xitij2000 commented 5 years ago

I think @giovannicimolin would be better suited for that! I don't know the steps myself. I have asked him, and he should chime in with his availability.

giovannicimolin commented 5 years ago

@natabene I ended up missing your first ping on my email backlog.

Can you try going in https://circleci.com/gh/edx-solutions/xblock-image-explorer/edit#checkout and clicking on Create and add Deploy key if the button is available? It should work if you have administrative permissions on the repository. If that doesn't work I'm not really sure of what can be done, as I used the exact same process on my personal repositories.

In any case, the CI is working with my own keys for now, but we should provide it with proper credentials.

natabene commented 5 years ago

@giovannicimolin Tried, but I only see "Add Deploy Key". Attached is screenshot of my view. screencapture-circleci-gh-edx-solutions-xblock-image-explorer-edit-2019-06-05-13_27_12

giovannicimolin commented 5 years ago

@natabene Can you try it? (clicking on Add Deploy Key) I think it change a little bit depending if it's an organization or a personal repository.

natabene commented 5 years ago

@giovannicimolin Please remind me, did we sort this out?

giovannicimolin commented 5 years ago

@natabene We did sort this out. You had to go into circleci settings and add a deploy key because I didn't had the necessary permissions.