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

Added Tutor in CI #339

Merged
merged 14 commits into from
Jul 3, 2024
Merged

Added Tutor in CI #339

merged 14 commits into from
Jul 3, 2024

Conversation

Anas12091101
Copy link
Contributor

@Anas12091101 Anas12091101 commented Jun 7, 2024

What are the relevant tickets?

https://github.com/mitodl/hq/issues/4443

Description (What does it do?)

This PR replaces devstack with tutor in the CI for initializing edx-platform and running the integration tests of plugins. More details in the ticket

How can this be tested?

  • Please see the CI job logs
  • To test locally, try to follow the job steps from the CI on your local machine.( this will take a while to run )
    • Build all the plugins packages using pants build ::
    • install tutor:
      • Nightly for Master Branch
         git clone --branch=nightly https://github.com/overhangio/tutor.git
         pip install -e "./tutor"
        
      • For Quince branch pip install tutor==17.0.6
      • For Redwood branch pip install tutor==18.0.0
    • Go to edx-platform directory and run tutor mounts add .
    • Build tutor images by running tutor images build openedx-dev
    • Run the launch command of tutor to complete the setup tutor dev launch --non-interactive
    • Stop the running containers tutor dev stop
    • Run the following commands:
       DEV="tutor_dev"  #"tutor_nightly_dev" in case of master branch
       docker-compose -f $(tutor config printroot)/env/local/docker-compose.yml -f $(tutor config printroot)/env/dev/docker-compose.yml --project-name $DEV run -v $PWD/../open-edx-plugins:/open-edx-plugins lms /open-edx-plugins/run_devstack_integration_tests.sh       
      
    • Validate the tests running and passing successfully

@Anas12091101 Anas12091101 marked this pull request as draft June 7, 2024 14:06
@Anas12091101 Anas12091101 force-pushed the anas/add-tutor branch 8 times, most recently from 807f669 to 629e410 Compare June 12, 2024 15:10
@Anas12091101
Copy link
Contributor Author

Anas12091101 commented Jun 13, 2024

This PR is waiting for the redwood release. For now, it is only working for the quince release. It's failing on master because the master branch of edx-platform is broken due to a dependency version issue. For redwood, the tutor is not yet ready (release notes for the latest major release v17.0.0).

@Anas12091101 Anas12091101 marked this pull request as ready for review June 24, 2024 19:30
cd /open-edx-plugins

# Installing dev dependencies
pip install poetry
poetry install --no-interaction --only dev
Copy link
Contributor Author

@Anas12091101 Anas12091101 Jun 25, 2024

Choose a reason for hiding this comment

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

Removed this code of installing dev dependencies as this resulted in a conflict with tutor edx-platform dependencies. I believe all the required dev dependencies are already installed in the tutor edx-platform container.

@Anas12091101 Anas12091101 changed the title feat: testing tutor in CI Added Tutor in CI Jun 25, 2024
pyproject.toml Outdated
Comment on lines 25 to 33
[tool.poetry.group.dev.dependencies]
black = "*"
isort = "*"
pre-commit = "^3.0.0"
pytest = "^8.0.0"
twine = "^5.0.0"
ruff = "^0.4.0"
pytest-mock = "^3.14.0"

Copy link
Member

Choose a reason for hiding this comment

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

Why did this block get deleted? We can legitimately get rid of black and isort, but the rest should be retained.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought we were only using these dependencies in the CI, therefore deleted them, will re-add them in the next commit.

Copy link
Member

@blarghmatey blarghmatey left a comment

Choose a reason for hiding this comment

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

Aside from the deletion of the dev dependencies, the rest of the changes here look good.

@Anas12091101 Anas12091101 merged commit 3b6936e into main Jul 3, 2024
11 checks passed
@Anas12091101 Anas12091101 deleted the anas/add-tutor branch July 3, 2024 13:21
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.

2 participants