From 49d80e8968c6e22aedf4d1e5c068a888bbe0a79f Mon Sep 17 00:00:00 2001 From: magajh Date: Fri, 13 Sep 2024 04:59:12 -0400 Subject: [PATCH] test --- .github/workflows/test.yml | 107 ++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 50 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9aafd7e..0944e85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,64 +1,71 @@ -name: Tutor Open edX CI +name: Tutor Setup with Plugin Verification -on: - push: - branches: - - '*' # This will trigger the workflow on push to any branch +on: [push] jobs: setup-tutor: runs-on: ubuntu-latest steps: - - name: Checkout code + - name: Checkout repository uses: actions/checkout@v2 - - name: Install dependencies +# - name: Set up Python 3.11 +# uses: actions/setup-python@v2 +# with: +# python-version: '3.11' + + - name: Check open ports + run: | + sudo netstat -tuln # Or use ss if netstat is not available + + - name: Check for web proxy services + run: | + ps aux | grep -E 'nginx|apache|caddy' + + - name: Check for proxy environment variables + run: | + env | grep -i proxy + + - name: Install Tutor + run: | + python3 -m pip install --upgrade pip + python3 -m pip install tutor + +# - name: Add extra LMS requirements +# run: | +# # Create a custom Tutor configuration to add extra pip requirements for the LMS +# tutor config save --set OPENEDX_EXTRA_PIP_REQUIREMENTS="eox-core\neox-tenant" + +# - name: Rebuild the LMS image to include the extra requirements +# run: | +# tutor images build openedx + +# - name: Configure LMS to be externally accessible +# run: | +# tutor config save --set LMS_HOST=0.0.0.0 + + - name: Start Tutor run: | - sudo apt-get update - sudo apt-get install -y python3 python3-pip curl - pip3 install tutor + tutor local launch -I - - name: Configure Tutor plugin + - name: Install additional LMS requirements run: | - tutor plugins create patches <> $GITHUB_ENV + + - name: Check LMS logs run: | - tutor config save - tutor local launch + tutor local logs lms --tail=200 # Retrieve the last 100 lines of LMS logs - - name: Check Open edX LMS heartbeat + - name: Check LMS heartbeat endpoint run: | - until curl -sSf http://localhost:8000/heartbeat; do - echo "Waiting for LMS to be ready..." - sleep 5 - done - echo "LMS is up and running!" + curl -f http://LMS:8000/heartbeat