-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (52 loc) · 1.56 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
# https://docs.travis-ci.com/user/reference/xenial/
dist: xenial
env:
global:
- PRE_COMMIT_HOME=$HOME/.cache/pre-commit
- TWINE_USERNAME=andreoliwa
cache:
npm: true
directories:
- $HOME/.cache/pip
- $PRE_COMMIT_HOME
- $HOME/libpostal
# https://docs.travis-ci.com/user/languages/python/
language: python
python:
- "3.7"
stages:
- name: release
if: branch = master
- name: test
jobs:
include:
# Define the release stage that runs semantic-release
# https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/travis.md
- stage: release
install:
- pip install -U poetry pre-commit bumpversion twine
- npm install -g semantic-release@15 @semantic-release/changelog @semantic-release/git @semantic-release/exec
script: skip
deploy:
provider: script
skip_cleanup: true
script: semantic-release
- stage: test
install:
# https://github.com/openvenues/libpostal#installation-maclinux
- mkdir -p $HOME/libpostal
- sudo apt-get install curl autoconf automake libtool pkg-config
- git clone https://github.com/openvenues/libpostal
- cd libpostal
- ./bootstrap.sh
- ./configure --datadir=$HOME/libpostal
- make -j4
- sudo make install
- sudo ldconfig
- cd ..
# end of libpostal install
- pip install -U poetry pre-commit
- poetry install --no-ansi --no-interaction
script:
# Run all pre-commit hooks on Travis.
- pre-commit run --all-files