diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39c68ddc..b88e855b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,11 @@ jobs: python-version: ['py38'] django-version: ['django32', 'django42'] db-version: ['mysql57', 'mysql80'] - # excluding mysql5.7 with Django 4.2 since Django 4.2 has + # excluding mysql5.7 with Django 4.2 since Django 4.2 has # dropped support for MySQL<8 exclude: - - django-version: 'django42' - db-version: 'mysql57' + - django-version: 'django42' + db-version: 'mysql57' steps: - uses: actions/checkout@v2 @@ -29,7 +29,8 @@ jobs: docker-compose -f .travis/docker-compose-travis.yml up -d - name: Install Dependencies run: | - pip install -r requirements/travis.txt + docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} --env DB_HOST=${{ matrix.db-version }} -u root edx_notes_api \ + /bin/bash -c "apt-get update && apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config" - name: Run Tests run: | docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} --env DB_HOST=${{ matrix.db-version }} -u root edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.travis/run_tests.sh diff --git a/Makefile b/Makefile index cd8500d9..31b6973c 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,6 @@ piptools: ## install pinned version of pip-compile and pip-sync upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade upgrade: piptools ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in # Make sure to compile files after any other files they include! - pip-compile --upgrade -o requirements/travis.txt requirements/travis.in pip-compile --upgrade --rebuild --allow-unsafe -o requirements/pip.txt requirements/pip.in pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in pip install -qr requirements/pip.txt @@ -77,4 +76,6 @@ upgrade: piptools ## update the requirements/*.txt files with the latest package pip-compile --upgrade -o requirements/test.txt requirements/test.in # Let tox control the Django version for tests grep -e "^django==" requirements/base.txt > requirements/django.txt - sed -i '/^[dD]jango==/d' requirements/test.txt + sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp + mv requirements/test.tmp requirements/test.txt + diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 74c0a461..fa7b0411 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -21,3 +21,4 @@ python-dateutil==2.4.0 newrelic==4.8.0.110 more-itertools==5.0.0 pylint==1.5.0 +django-cors-headers==3.14.0 diff --git a/requirements/production.txt b/requirements/production.txt new file mode 100644 index 00000000..e69de29b