Skip to content
Snippets Groups Projects
Commit 87c11791 authored by Jawayria's avatar Jawayria Committed by Soban Javed
Browse files

feat: Added support for django32

parent 9a43bc4b
No related branches found
No related tags found
No related merge requests found
name: Python CI
on:
push:
branches: [master]
pull_request:
branches:
- '**'
jobs:
run_tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [py38-django22, py38-django30, py38-django31, py38-django32, quality]
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
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
- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='py38-django22'
uses: codecov/codecov-action@v1
with:
flags: unittests
fail_ci_if_error: true
name: Publish package to PyPi
on:
push:
tags:
- '*'
jobs:
push:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install pip
run: pip install -r requirements/pip.txt
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
language: python
sudo: false
python:
- '3.8'
env:
- TOXENV=py38-django22
- TOXENV=quality
install:
- pip install -r requirements/travis.txt
script:
- tox
after_success: coveralls
deploy:
provider: pypi
user: edx
distributions: sdist bdist_wheel
on:
python: 3.8
tags: true
password:
secure: DKlhHIFctJS9k/1sdlKfL34MwVIHxZn6QwrQ4/jMaiucNARP7MUoTEhd5wEN7wNMyafsYfkY960/dJuqgF6ztZzt7jYX+Nu9o0YEOM742f5hcqQcn/k2GrU2X5+hMgAVUL3YP4JlZwst4pRM1eRlzXgsoxqCET84V2biS1d04ivJgKO5T9NNHTeIQDRDpSpUVuloY1qVMS6IFewLjL6XZuCYtCBXBcBN29EDFvy8v683JAZyz332Xr8R0yF/u09XFKnW+migeiT9gWNafIKXgDAidr0gbkF4r71OdGCUxhCwa+/IHnAYCptajzd4QUd2gj5yOccbVhtUondK3DSA6NaAHdwFjmU7XS5XouDlMS83wyTbqGlEXj9dEuY6lq/UXeUjvfmbqUc1W5qi7eKGxY2qZ1+3HucnCVlPbzgEVMxnPN/YtPe59SSay60gFD7KyZfxxavLsuhSFM4+aZ/hyW9pI1vu+k9UuVVEw9QisUORHHg5YYC75BsVXI5kkhXAF7F880cFlV+DPEt7mwM0xsAPcbyStmmJ+7sXkoI6bWF+QsveqgY4SPYD14bZ8v3PK4b5UzrQOHSEpa1NNrm7942lnkySoC5Rm6YIShnLdJ+Gdf8wb4RezqnhmZcKVc/9QXQcUga+nj5CRUb9wFVncmak2tf8aAvfqeML8pHzkrs=
......@@ -39,12 +39,13 @@ $(COMMON_CONSTRAINTS_TXT):
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q -r requirements/pip_tools.txt
pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/dev.txt requirements/dev.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
pip-compile --upgrade -o requirements/tox.txt requirements/tox.in
pip-compile --upgrade -o requirements/travis.txt requirements/travis.in
pip-compile --upgrade -o requirements/ci.txt requirements/ci.in
# Let tox control the Django version version for tests
grep -e "^django==" requirements/test.txt > requirements/django.txt
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
......
......@@ -435,8 +435,8 @@ Changelog
* LTI 1.3 support.
.. |Build Status| image:: https://travis-ci.com/edx/xblock-lti-consumer.svg
:target: https://travis-ci.com/edx/xblock-lti-consumer
.. |Build Status| image:: https://github.com/edx/xblock-lti-consumer/workflows/Python%20CI/badge.svg?branch=master
:target: https://github.com/edx/xblock-lti-consumer/actions?query=workflow%3A%22Python+CI%22
.. |Coveralls| image:: https://coveralls.io/repos/edx/xblock-lti-consumer/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/edx/xblock-lti-consumer?branch=master
......@@ -130,7 +130,7 @@ def public_keyset_endpoint(request, usage_id=None):
@require_http_methods(["GET", "POST"])
def launch_gate_endpoint(request, suffix):
def launch_gate_endpoint(request, suffix=None):
"""
Gate endpoint that triggers LTI launch endpoint XBlock handler
......
# Requirements for running tests in Travis
# Requirements for running tests in Github Actions
-c constraints.txt
-r test.txt
......
......@@ -21,11 +21,11 @@ bleach==4.1.0
# via
# -r requirements/test.txt
# readme-renderer
boto3==1.18.30
boto3==1.18.31
# via
# -r requirements/test.txt
# fs-s3fs
botocore==1.21.30
botocore==1.21.31
# via
# -r requirements/test.txt
# boto3
......@@ -62,10 +62,6 @@ coverage==5.5
# coveralls
coveralls==3.2.0
# via -r requirements/test.txt
cryptography==3.4.8
# via
# -r requirements/test.txt
# secretstorage
ddt==1.4.2
# via -r requirements/test.txt
distlib==0.3.2
......@@ -145,7 +141,7 @@ idna==3.2
# via
# -r requirements/test.txt
# requests
importlib-metadata==4.6.3
importlib-metadata==4.8.1
# via
# -r requirements/test.txt
# keyring
......@@ -317,10 +313,6 @@ s3transfer==0.5.0
# via
# -r requirements/test.txt
# boto3
secretstorage==3.3.1
# via
# -r requirements/test.txt
# keyring
simplejson==3.17.5
# via
# -r requirements/test.txt
......
# Core dependencies for installing other packages
pip
setuptools
wheel
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
wheel==0.37.0
# via -r requirements/pip.in
# The following packages are considered to be unsafe in a requirements file:
pip==21.2.4
# via -r requirements/pip.in
setuptools==57.4.0
# via -r requirements/pip.in
......@@ -16,9 +16,9 @@ bleach==4.1.0
# via
# -r requirements/base.txt
# readme-renderer
boto3==1.18.30
boto3==1.18.31
# via fs-s3fs
botocore==1.21.30
botocore==1.21.31
# via
# boto3
# s3transfer
......@@ -45,8 +45,6 @@ coverage==5.5
# via coveralls
coveralls==3.2.0
# via -r requirements/test.in
cryptography==3.4.8
# via secretstorage
ddt==1.4.2
# via -r requirements/test.in
# via
......@@ -111,7 +109,7 @@ idna==3.2
# via
# -r requirements/base.txt
# requests
importlib-metadata==4.7.1
importlib-metadata==4.8.1
# via
# keyring
# twine
......@@ -238,8 +236,6 @@ rfc3986==1.5.0
# via twine
s3transfer==0.5.0
# via boto3
secretstorage==3.3.1
# via keyring
simplejson==3.17.5
# via
# -r requirements/base.txt
......
......@@ -49,7 +49,7 @@ with open('README.rst') as _f:
setup(
name='lti-consumer-xblock',
version='3.0.4',
version='3.1.0',
author='Open edX project',
author_email='oscm@edx.org',
description='This XBlock implements the consumer side of the LTI specification.',
......@@ -78,6 +78,9 @@ setup(
'Development Status :: 5 - Production/Stable',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Natural Language :: English',
......
......@@ -20,3 +20,7 @@ FEATURES = {}
REST_FRAMEWORK = {
'PAGE_SIZE': 10
}
DEFAULT_HASHING_ALGORITHM = "sha1"
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
[tox]
envlist = py38-django{22}, quality
envlist = py38-django{22,30,31,32}, quality
[testenv]
whitelist_externals =
make
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<4.0
-r{toxinidir}/requirements/test.txt
commands =
make test
[testenv:quality]
whitelist_externals =
make
......@@ -17,4 +21,3 @@ deps =
-r{toxinidir}/requirements/test.txt
commands =
make quality
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment