Skip to content

Commit

Permalink
Trying out circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
owais committed Jan 11, 2020
1 parent bc276a2 commit 380f416
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 19 deletions.
64 changes: 45 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,75 @@ workflows:
version: 2
test:
jobs:
- test-3.3
- test-3.4
- test-3.5
- test-3.4-17
- test-3.4-18
- test-3.4-19
- test-3.4-110
- test-3.4-111
- test-3.5-17
- test-3.5-18
- test-3.5-19
- test-3.5-110
- test-3.5-111
- test-3.6-17
- test-3.6-18
- test-3.6-19
- test-3.6-110
- test-3.6-111
jobs:
test-3.3: &test-template
base: &test-template
docker:
- image: circleci/python:3.3-jessie
- image: circleci/python:3.4-jessie
working_directory: ~/repo
steps:
- checkout
- run:
name: change_dir
command: cd tests
- run:
name: setup nodejs
command: |
sudo apt-get install apt-transport-https
curl -sL https://deb.nodesource.com/setup_13.x | sudo bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn nodejs --fix-missing
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "package.json" }}
- v1-dependencies-
- run:
name: check
command: ls
name: JS deps
command: cd tests && yarn
- run:
name: Install dependencies
name: setup python
command: |
python -m venv venv || virtualenv venv
. venv/bin/activate
ls tests
ls tests/requirements
cat tests/requirements/common.txt
pip install -r tests/requirements/common.txt
pip install -r tests/requirements/django17.txt
python3 -m venv venv
source venv/bin/activate
python --version
rm -f requirements.txt
cat tests/requirements/common.txt > tests/requirements.txt
cat tests/requirements/django${DJANGO_VERSION}.txt >> tests/requirements.txt
pip install -r tests/requirements.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "package.json" }}
- run:
name: Run tests
command: |
coverage run --source=webpack_loader tests/manage.py test {posargs}
test-3.4:
source venv/bin/activate
cd tests
coverage run --source=webpack_loader manage.py test
test-3.4-17:
<<: *test-template
docker:
- image: circleci/python:3.4-jessie
test-3.5:
environment:
DJANGO_VERSION: "17"
test-3.4-18:
<<: *test-template
docker:
- image: circleci/python:3.5-jessie
- image: circleci/python:3.6-jessie
environment:
DJANGO_VERSION: "18"
3 changes: 3 additions & 0 deletions tests/requirements/common.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coveralls
coverage
unittest2
1 change: 1 addition & 0 deletions tests/requirements/django17.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
django==1.7
django_jinja<2.0
2 changes: 2 additions & 0 deletions tests/requirements/django18.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
django==1.7
django_jinja>=2.0

0 comments on commit 380f416

Please sign in to comment.