我使用TravisCi来构建和测试一个基于Django的项目。
这是我的
.travis.yml
文件:
language: python
python:
- "3.6"
addons:
- postgresql: "9.6"
before_install:
- cd $TRAVIS_BUILD_DIR/src
install:
- npm install -g sass
- make init
before_script:
- psql --version
- psql -c 'SELECT version();' -U postgres
- psql -c "CREATE USER aides WITH CREATEDB PASSWORD 'aides';" -U postgres
script:
- make checkstyle
- make test
下面是困扰我的构建部分:
$ psql --version
psql (PostgreSQL) 9.6.6
$ psql -c 'SELECT version();' -U postgres
version
--------------------------------------------------------------------------------------------------------------
PostgreSQL 9.2.24 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4, 64-bit
(1 row)
除非我漏掉了什么明显的东西
psql