forked from michiya/django-pyodbc-azure
-
Notifications
You must be signed in to change notification settings - Fork 51
/
.travis.yml
72 lines (56 loc) · 3.6 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
sudo: required
language: python
dist: xenial
cache: pip
branches:
only:
- master
env:
global:
- PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR/django
- DATABASE_URL="mssql://SA:MyPassword42@localhost:1433/default?isolation_level=read committed&driver=ODBC Driver 17 for SQL Server"
- DATABASE_URL_OTHER="mssql://SA:MyPassword42@localhost:1433/other?isolation_level=read committed&driver=ODBC Driver 17 for SQL Server"
services: docker
templates:
linux_before_install: &linux_before_install
- docker pull mcr.microsoft.com/mssql/server:2017-latest-ubuntu
- docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyPassword42' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest-ubuntu
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
- sudo apt-get update
- sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 g++ unixodbc-dev
win_before_install: &win_before_install
- docker pull christianacca/mssql-server-windows-express:1803
- docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyPassword42' -p 1433:1433 -d christianacca/mssql-server-windows-express:1803
- wget https://download.microsoft.com/download/E/6/B/E6BFDC7A-5BCD-4C51-9912-635646DA801E/en-US/msodbcsql_17.3.1.1_x64.msi
- powershell "Start-Process msiexec.exe -Wait -ArgumentList '/I msodbcsql_17.3.1.1_x64.msi /qn /norestart IACCEPTMSODBCSQLLICENSETERMS=YES'"
- choco install python3 --version 3.7.2
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
matrix:
include:
- env: FLAKE8
python: "3.7"
install: pip install flake8==3.7.1
script: flake8
- { before_install: *linux_before_install, python: "3.6", os: linux, env: TOX_ENV=py36-django22 }
- { before_install: *linux_before_install, python: "3.6", os: linux, env: TOX_ENV=py36-django30 }
- { before_install: *linux_before_install, python: "3.6", os: linux, env: TOX_ENV=py36-django31 }
- { before_install: *linux_before_install, python: "3.7", os: linux, env: TOX_ENV=py37-django22 }
- { before_install: *linux_before_install, python: "3.7", os: linux, env: TOX_ENV=py37-django30 }
- { before_install: *linux_before_install, python: "3.7", os: linux, env: TOX_ENV=py37-django31 }
- { before_install: *linux_before_install, python: "3.8", os: linux, env: TOX_ENV=py38-django30 }
- { before_install: *linux_before_install, python: "3.8", os: linux, env: TOX_ENV=py38-django31 }
- { before_install: *win_before_install, language: sh, python: "3.6", os: windows, env: TOX_ENV=py36-django22 }
- { before_install: *win_before_install, language: sh, python: "3.6", os: windows, env: TOX_ENV=py36-django30 }
- { before_install: *win_before_install, language: sh, python: "3.6", os: windows, env: TOX_ENV=py36-django31 }
- { before_install: *win_before_install, language: sh, python: "3.7", os: windows, env: TOX_ENV=py37-django22 }
- { before_install: *win_before_install, language: sh, python: "3.7", os: windows, env: TOX_ENV=py37-django30 }
- { before_install: *win_before_install, language: sh, python: "3.7", os: windows, env: TOX_ENV=py37-django31 }
- { before_install: *win_before_install, language: sh, python: "3.8", os: windows, env: TOX_ENV=py38-django30 }
- { before_install: *win_before_install, language: sh, python: "3.8", os: windows, env: TOX_ENV=py38-django31 }
install:
- python -m pip install --upgrade pip wheel setuptools
- pip install tox tox-travis tox-venv
- git clone https://github.com/django/django.git
script:
- tox -e $TOX_ENV