Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

feat: add django42 in CI #1510

Merged
merged 4 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/testing-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docker exec -t insights_testing bash -c "
cd /edx/app/insights/edx_analytics_dashboard/ &&
source /edx/app/insights/venvs/insights/bin/activate &&
PATH=\$PATH:/edx/app/insights/nodeenvs/insights/bin:/snap/bin &&
export TOXENV=django32 &&
export TOXENV=${TOXENV} &&
pip install -r requirements/github.txt &&
set -x &&
nodeenv --node=${NODE_VERSION} /edx/app/insights/nodeenvs/insights-test-${NODE} &&
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ docker exec -t insights_testing bash -c "
cd /edx/app/insights/edx_analytics_dashboard/ &&
source /edx/app/insights/venvs/insights/bin/activate &&
PATH=\$PATH:/edx/app/insights/nodeenvs/insights/bin:/snap/bin &&
export TOXENV=django32 &&
export TOXENV=${TOXENV} &&
pip install -r requirements/github.txt &&
make $TARGETS
"
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
python-version: ["3.8"]
os: [ubuntu-20.04]
toxenv: [django32]
toxenv: [django32, django42]
node: [16]
env:
DATA_API_VERSION: "latest"
Expand All @@ -31,7 +31,7 @@ jobs:
run: |
docker exec analytics_api bash -c "
source /edx/app/analytics_api/venvs/analytics_api/bin/activate &&
pip install setuptools==49.6.0 &&
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
Expand All @@ -41,32 +41,37 @@ jobs:
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
2 changes: 1 addition & 1 deletion analytics_dashboard/core/tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MiddlewareTestCase(TestCase):
def setUp(self):
super().setUp()
self.factory = RequestFactory()
self.middleware = self.middleware_class() # pylint: disable=not-callable
self.middleware = self.middleware_class(get_response=lambda request: None) # pylint: disable=not-callable


class MiddlewareAssertionMixin:
Expand Down
2 changes: 1 addition & 1 deletion analytics_dashboard/help/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def build_doc_url(path):

class HelpURLMiddlewareTests(TestCase):
def setUp(self):
self.middleware = HelpURLMiddleware()
self.middleware = HelpURLMiddleware(get_response=lambda request: None)

def assertHelpURLEqual(self, page_token, expected_url):
request = http.HttpRequest()
Expand Down
4 changes: 3 additions & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ django-crispy-forms # MIT
django-lang-pref-middleware
django-waffle # BSD
django-soapbox # BSD
pinax-announcements # MIT
edx-auth-backends
edx-ccx-keys
edx-opaque-keys
Expand All @@ -32,3 +31,6 @@ stevedore
path.py
python-slugify
social-auth-app-django

# Using github hash temporarily until new version of pinax-announcements gets released
-e git+https://github.com/openedx/pinax-announcements.git@60a3fdf171b520d8593a9b2190d1c01a6614ab59#egg=pinax-announcements
18 changes: 10 additions & 8 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
#
# make upgrade
#
-e git+https://github.com/openedx/pinax-announcements.git@60a3fdf171b520d8593a9b2190d1c01a6614ab59#egg=pinax-announcements
Copy link
Contributor

Choose a reason for hiding this comment

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

# via -r requirements/base.in
asgiref==3.7.2
# via
# django
# django-countries
certifi==2023.7.22
# via requests
cffi==1.15.1
cffi==1.16.0
# via
# cryptography
# pynacl
charset-normalizer==3.2.0
charset-normalizer==3.3.0
# via requests
click==8.1.7
# via
Expand All @@ -26,11 +28,11 @@ cryptography==41.0.4
# via
# pyjwt
# social-auth-core
defusedxml==0.7.1
defusedxml==0.8.0rc2
# via
# python3-openid
# social-auth-core
django==3.2.21
django==3.2.22
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
Expand Down Expand Up @@ -107,7 +109,7 @@ edx-django-utils==5.7.0
# edx-toggles
edx-drf-extensions==8.10.0
# via -r requirements/base.in
edx-i18n-tools==1.2.0
edx-i18n-tools==1.3.0
# via -r requirements/base.in
edx-opaque-keys==2.5.1
# via
Expand All @@ -126,6 +128,8 @@ libsass==0.22.0
# via -r requirements/base.in
logutils==0.3.5
# via -r requirements/base.in
lxml==4.9.3
# via edx-i18n-tools
markupsafe==2.1.3
# via jinja2
newrelic==9.1.0
Expand All @@ -142,8 +146,6 @@ path-py==12.5.0
# via -r requirements/base.in
pbr==5.11.1
# via stevedore
pinax-announcements==4.0.0
# via -r requirements/base.in
polib==1.2.0
# via edx-i18n-tools
psutil==5.9.5
Expand Down Expand Up @@ -222,7 +224,7 @@ typing-extensions==4.8.0
# edx-opaque-keys
unicodecsv==0.14.1
# via djangorestframework-csv
urllib3==1.26.16
urllib3==1.26.17
# via
# -c requirements/constraints.txt
# requests
2 changes: 1 addition & 1 deletion requirements/django.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
django==3.2.21
django==3.2.22
1 change: 1 addition & 0 deletions requirements/django42.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Django>=4.2,<4.3
24 changes: 14 additions & 10 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# make upgrade
#
-e git+https://github.com/openedx/pinax-announcements.git@60a3fdf171b520d8593a9b2190d1c01a6614ab59#egg=pinax-announcements
# via -r requirements/base.txt
accessible-pygments==0.0.4
# via pydata-sphinx-theme
alabaster==0.7.13
Expand All @@ -13,7 +15,7 @@ asgiref==3.7.2
# -r requirements/base.txt
# django
# django-countries
babel==2.12.1
babel==2.13.0
# via
# pydata-sphinx-theme
# sphinx
Expand All @@ -23,12 +25,12 @@ certifi==2023.7.22
# via
# -r requirements/base.txt
# requests
cffi==1.15.1
cffi==1.16.0
# via
# -r requirements/base.txt
# cryptography
# pynacl
charset-normalizer==3.2.0
charset-normalizer==3.3.0
# via
# -r requirements/base.txt
# requests
Expand All @@ -46,12 +48,12 @@ cryptography==41.0.4
# -r requirements/base.txt
# pyjwt
# social-auth-core
defusedxml==0.7.1
defusedxml==0.8.0rc2
# via
# -r requirements/base.txt
# python3-openid
# social-auth-core
django==3.2.21
django==3.2.22
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
Expand Down Expand Up @@ -135,7 +137,7 @@ edx-django-utils==5.7.0
# edx-toggles
edx-drf-extensions==8.10.0
# via -r requirements/base.txt
edx-i18n-tools==1.2.0
edx-i18n-tools==1.3.0
# via -r requirements/base.txt
edx-opaque-keys==2.5.1
# via
Expand Down Expand Up @@ -163,6 +165,10 @@ libsass==0.22.0
# via -r requirements/base.txt
logutils==0.3.5
# via -r requirements/base.txt
lxml==4.9.3
# via
# -r requirements/base.txt
# edx-i18n-tools
markupsafe==2.1.3
# via
# -r requirements/base.txt
Expand All @@ -176,7 +182,7 @@ oauthlib==3.2.2
# -r requirements/base.txt
# requests-oauthlib
# social-auth-core
packaging==23.1
packaging==23.2
# via
# pydata-sphinx-theme
# sphinx
Expand All @@ -191,8 +197,6 @@ pbr==5.11.1
# via
# -r requirements/base.txt
# stevedore
pinax-announcements==4.0.0
# via -r requirements/base.txt
polib==1.2.0
# via
# -r requirements/base.txt
Expand Down Expand Up @@ -334,7 +338,7 @@ unicodecsv==0.14.1
# via
# -r requirements/base.txt
# djangorestframework-csv
urllib3==1.26.16
urllib3==1.26.17
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
Expand Down
6 changes: 3 additions & 3 deletions requirements/github.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
coverage==7.3.1
coverage==7.3.2
# via -r requirements/github.in
distlib==0.3.7
# via
Expand All @@ -15,11 +15,11 @@ filelock==3.12.4
# -r requirements/tox.txt
# tox
# virtualenv
packaging==23.1
packaging==23.2
# via
# -r requirements/tox.txt
# tox
platformdirs==3.10.0
platformdirs==3.11.0
# via
# -r requirements/tox.txt
# virtualenv
Expand Down
Loading
Loading