Merge pull request #378 from edly-io/fix/default-file-storage-django4… #421
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: | |
| - '**' | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| python-tests: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04] | |
| python-version: ['3.12'] | |
| edx_branch: ['master', 'open-release/sumac.master', 'release/teak'] | |
| toxenv: [py312-django42, py312-django52] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Python setup | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: tox install | |
| run: pip install tox | |
| - name: Run Tests | |
| env: | |
| TOXENV: ${{ matrix.toxenv }} | |
| run: tox | |
| - name: Upload coverage to CodeCov | |
| if: matrix.python-version == '3.12' && matrix.toxenv == 'py312-django42' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| - name: Install tutor | |
| run: | | |
| if [[ "${{ matrix.edx_branch }}" == "open-release/sumac.master" ]]; then | |
| pip install "tutor>=19.0.0,<20.0.0" | |
| elif [[ "${{ matrix.edx_branch }}" == "master" ]]; then | |
| git clone --branch=main https://github.com/overhangio/tutor.git | |
| pip install -e "./tutor" | |
| else | |
| pip install "tutor>=20.0.0,<21.0.0" | |
| fi | |
| - name: Set up tutor with edx-platform | |
| run: | | |
| cd .. | |
| git clone https://github.com/openedx/edx-platform | |
| cd edx-platform | |
| git checkout ${{ matrix.edx_branch }} | |
| tutor mounts add . | |
| tutor dev launch --non-interactive | |
| tutor dev stop | |
| - name: Run Integration Tests | |
| run: | | |
| if [[ "${{ matrix.edx_branch }}" == "master" ]]; then | |
| DIRECTORY="tutor-main" | |
| DEV="tutor_main_dev" | |
| else | |
| DIRECTORY="tutor" | |
| DEV="tutor_dev" | |
| fi | |
| EDX_WORKSPACE=$PWD/.. docker compose -f /home/runner/.local/share/$DIRECTORY/env/local/docker-compose.yml -f /home/runner/.local/share/$DIRECTORY/env/dev/docker-compose.yml --project-name $DEV run -v $PWD/../edx-sga:/edx-sga lms /edx-sga/run_edx_integration_tests.sh | |
| - name: Upload coverage to CodeCov | |
| if: matrix.python-version == '3.12' && matrix.toxenv == 'py312-django42' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false |