feat: [FC-7879] implement get_user_dates() method to get all user dates for a course#326 #582
Workflow file for this run
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: Python CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| run_tests: | |
| name: Tests | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| python-version: [ '3.11','3.12' ] | |
| toxenv: [ quality, docs, pii_check, django42, django52 ] | |
| db: [ mysql, postgres ] | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_DATABASE: openedx | |
| MYSQL_ROOT_PASSWORD: openedx | |
| ports: | |
| - 3307:3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_USER: openedx | |
| POSTGRES_PASSWORD: openedx | |
| POSTGRES_DB: openedx | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install pip | |
| run: pip install -r requirements/pip.txt | |
| - name: Install Dependencies | |
| run: | | |
| pip install -r requirements/ci.txt | |
| pip install -r requirements/test.txt | |
| pip install mysqlclient | |
| pip install mysqlclient psycopg2-binary | |
| - name: Run Tests | |
| env: | |
| TOXENV: ${{ matrix.toxenv }} | |
| DB_ENGINE: ${{ matrix.db == 'mysql' && 'django.db.backends.mysql' || 'django.db.backends.postgresql' }} | |
| DB_NAME: openedx | |
| DB_USER: ${{ matrix.db == 'mysql' && 'root' || 'openedx' }} | |
| DB_PASSWORD: openedx | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: ${{ matrix.db == 'mysql' && '3307' || '5432' }} | |
| run: | | |
| tox | |
| - name: Rename Coverage File | |
| if: matrix.python-version == '3.11' && matrix.toxenv=='django52' | |
| run: | | |
| if [ -f .coverage ]; then | |
| mv .coverage coverage.${{ matrix.db }} | |
| fi | |
| - name: Upload Coverage Artifact | |
| if: matrix.python-version == '3.11' && matrix.toxenv=='django52' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-${{ matrix.db }} | |
| path: coverage.${{ matrix.db }} | |
| include-hidden-files: true | |
| merge_and_upload_coverage: | |
| name: Merge and Upload Coverage | |
| needs: run_tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download Coverage Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: coverage-mysql | |
| path: ./ | |
| - name: Download Coverage Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: coverage-postgres | |
| path: ./ | |
| - name: Debug Coverage File | |
| run: ls -la | |
| - name: Merge Coverage Reports | |
| run: | | |
| pip install coverage | |
| coverage combine coverage.mysql coverage.postgres | |
| coverage xml | |
| - name: Upload Coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| flags: unittests | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} |