Skip to content

Commit

Permalink
refactor: ensure Django 3.2 compatibility
Browse files Browse the repository at this point in the history
* refactor: ensure Django 3.2 compatibility
* replace travis by CircleCI
* bump Django min/max versions
* refactor setup.py
* bump xblock-sdk dependency
* add tox for test running
* bump package version
* chore: update translations
* chore: extend gitignore
* feat: upgrade poll XBlock to use celery 5.0+ features
  • Loading branch information
gabor-boros committed Nov 29, 2021
1 parent 5e849b5 commit 72705b6
Show file tree
Hide file tree
Showing 32 changed files with 1,419 additions and 624 deletions.
78 changes: 78 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,78 @@
version: 2.1

orbs:
browser-tools: circleci/browser-tools@1.2.3

commands:
install-dependencies:
steps:
- run:
name: Install OS dependencies
command: |
sudo apt update && sudo apt install -y nodejs npm gettext
# Upgrade nodejs after node-gyp installed properly
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install -y nodejs
- run:
name: Install project dependencies
command: |
pip install tox
make requirements
jobs:
quality:
docker:
# Always run with the minimum supported version
# to avoid new language feature checkes like f-strings
- image: cimg/python:2.7
steps:
- checkout
- install-dependencies
- run:
name: Check code quality
command: |
tox -e quality
test:
parameters:
image:
type: string
tox-env:
type: string
docker:
- image: << parameters.image >>
steps:
- checkout
- browser-tools/install-firefox
- browser-tools/install-geckodriver
- install-dependencies
- run:
name: Test << parameters.tox-env >>
command: |
tox -e << parameters.tox-env >>
workflows:
version: 2
main:
jobs:
- quality
- test:
requires:
- quality
matrix:
parameters:
image: ["cimg/python:2.7-browsers"]
tox-env: ["py27-django111"]
- test:
requires:
- quality
matrix:
parameters:
image: ["cimg/python:3.6-browsers"]
tox-env: ["py36-django22", "py36-django32"]
- test:
requires:
- quality
matrix:
parameters:
image: ["cimg/python:3.8-browsers"]
tox-env: ["py38-django22", "py38-django32"]
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -130,3 +130,9 @@ Session.vim

# KDE directory preferences
.directory

# Gecko logs
geckodriver.log

# Misc
.DS_Store
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions Makefile
Expand Up @@ -2,10 +2,9 @@

.DEFAULT_GOAL := help

FIREFOX_VERSION := $(shell grep firefox -- .travis.yml | egrep -o [0-9\.]+)
FIREFOX_VERSION := "94.0.1"
FIREFOX_LINUX_ARCH := $(shell uname -m)


help: ## display this help message
@echo "Please use \`make <target>' where <target> is one of"
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
Expand Down Expand Up @@ -35,7 +34,7 @@ node_requirements: ## Install requirements for handlebar templates i18n extracti
python_requirements: ## install development environment requirements
pip install -r requirements.txt --exists-action w
pip install -r requirements-dev.txt --exists-action w
cd $(VIRTUAL_ENV)/src/xblock-sdk && \
cd ./src/xblock-sdk && \
pip install -r requirements/base.txt && \
pip install -r requirements/test.txt
pip install -e .
Expand Down

0 comments on commit 72705b6

Please sign in to comment.