From e48d271cb19d58a48ed802835bd1a9253a236bd9 Mon Sep 17 00:00:00 2001 From: edX requirements bot Date: Fri, 23 Feb 2024 04:26:42 -0500 Subject: [PATCH] feat: add python312 support --- .github/workflows/ci.yml | 122 ++++++++++++++++++++------------------- tox.ini | 10 ++-- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b042423e9..1dacfb3c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: Default CI on: push: branches: - - master + - master pull_request: jobs: @@ -10,68 +10,70 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.8"] + python-version: + - "3.8" + - '3.12' os: [ubuntu-20.04] toxenv: [django42] node: [16] env: DATA_API_VERSION: "latest" steps: - - name: setup python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: start container - run: docker-compose -f .github/docker-compose-github.yml up -d - - name: setup analytics-api - run: | - docker exec analytics_api bash -c " - source /edx/app/analytics_api/venvs/analytics_api/bin/activate && - pip install setuptools==68.2.2 && - make -C /edx/app/analytics_api/analytics_api github_ci" - - name: install dependencies - run: pip install -r requirements/github.txt - - name: test quality - run: ./.github/scripts/testing.sh - shell: bash - env: - TESTNAME: quality - TARGETS: "quality" - TOXENV: ${{ matrix.toxenv }} - - name: test js - run: ./.github/scripts/testing-js.sh - shell: bash - env: - TESTNAME: js - NODE: ${{ matrix.node }} - TOXENV: ${{ matrix.toxenv }} - TARGETS: "requirements.js validate_js" - - name: test i18n - run: ./.github/scripts/testing.sh - shell: bash - env: - TESTNAME: test-i18n - TOXENV: ${{ matrix.toxenv }} - TARGETS: "generate_fake_translations" - - name: test acceptance - run: ./.github/scripts/testing-js.sh - shell: bash - env: - TESTNAME: acceptance - NODE: ${{ matrix.node }} - TOXENV: ${{ matrix.toxenv }} - TARGETS: "requirements.a11y migrate requirements.js static accept" - - name: test python - run: ./.github/scripts/testing-js.sh - shell: bash - env: - TESTNAME: test-python - NODE: ${{ matrix.node }} - TOXENV: ${{ matrix.toxenv }} - TARGETS: "requirements.js static test_python" - - name: code cov - uses: codecov/codecov-action@v3 + - name: setup python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: start container + run: docker-compose -f .github/docker-compose-github.yml up -d + - name: setup analytics-api + run: | + docker exec analytics_api bash -c " + source /edx/app/analytics_api/venvs/analytics_api/bin/activate && + pip install setuptools==68.2.2 && + make -C /edx/app/analytics_api/analytics_api github_ci" + - name: install dependencies + run: pip install -r requirements/github.txt + - name: test quality + run: ./.github/scripts/testing.sh + shell: bash + env: + TESTNAME: quality + TARGETS: "quality" + TOXENV: ${{ matrix.toxenv }} + - name: test js + run: ./.github/scripts/testing-js.sh + shell: bash + env: + TESTNAME: js + NODE: ${{ matrix.node }} + TOXENV: ${{ matrix.toxenv }} + TARGETS: "requirements.js validate_js" + - name: test i18n + run: ./.github/scripts/testing.sh + shell: bash + env: + TESTNAME: test-i18n + TOXENV: ${{ matrix.toxenv }} + TARGETS: "generate_fake_translations" + - name: test acceptance + run: ./.github/scripts/testing-js.sh + shell: bash + env: + TESTNAME: acceptance + NODE: ${{ matrix.node }} + TOXENV: ${{ matrix.toxenv }} + TARGETS: "requirements.a11y migrate requirements.js static accept" + - name: test python + run: ./.github/scripts/testing-js.sh + shell: bash + env: + TESTNAME: test-python + NODE: ${{ matrix.node }} + TOXENV: ${{ matrix.toxenv }} + TARGETS: "requirements.js static test_python" + - name: code cov + uses: codecov/codecov-action@v3 diff --git a/tox.ini b/tox.ini index 8b74dba97..17bca3538 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,9 @@ [tox] -envlist = py38-django{42} +envlist = py{38, 312}-django{42} skipsdist = true [pytest] -DJANGO_SETTINGS_MODULE = analytics_dashboard.settings.test +django_settings_module = analytics_dashboard.settings.test [testenv] passenv = @@ -21,7 +21,7 @@ passenv = DISPLAY SELENIUM_BROWSER deps = - django42: -r requirements/django.txt + django42: Django>=4.2,<4.3 -r {toxinidir}/requirements/test.txt allowlist_externals = make @@ -35,10 +35,8 @@ allowlist_externals = make env setenv = -# -W will treat warnings as errors. SPHINXOPTS = -W commands = -# -e allows for overriding setting from the environment. -# -C changes the directory to `docs` before running the command. make -e -C docs/en_us/dashboard clean make -e -C docs/en_us/dashboard html +