-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
43 lines (35 loc) · 909 Bytes
/
.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
sudo: false
dist: xenial
services:
- postgresql
- mysql
- docker
os:
- linux
language: python
python:
- "3.6"
- "3.7"
- "3.8"
addons:
apt:
packages:
- unixodbc
- unixodbc-dev
before_install:
# install MSSQL driver
- sudo bash -c 'curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -'
- sudo bash -c 'curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list'
- sudo apt-get update
- sudo ACCEPT_EULA=Y apt-get install msodbcsql17
# 启动sqlserver docker容器
- docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=django321!' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest
install:
- pip install tox-travis coveralls
before_script:
- psql -c 'create database test;' -U postgres
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
script:
- tox
after_success:
- coveralls