-
Notifications
You must be signed in to change notification settings - Fork 49
/
.travis.yml
60 lines (59 loc) · 2.49 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
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
language: python
env:
- SLUGIFY_USES_TEXT_UNIDECODE=yes WITH_COVERAGE=true
python:
- "3.8.10"
cache: pip
addons:
apt:
packages:
- graphviz
- coreutils
- libxml2-utils
install:
- pip uninstall -y mock
- pip install -r requirements.txt
- sudo apt-get install
script:
- ./bin/o2a-run-all-configurations
- pre-commit run --all-files --hook-stage=push
- ./bin/o2a-generate-dependency-graph
- ./bin/o2a-generate-index images
- '[[ ! -z "${GCP_SERVICE_ACCOUNT}" ]] && [[ ! -z "${GCP_BUCKET_NAME}" ]] &&
gsutil -m cp -R images gs://${GCP_BUCKET_NAME}/commit-${TRAVIS_COMMIT}/images || true'
- ./bin/o2a-run-all-conversions py
- ./bin/o2a-generate-index output
- '[[ ! -z "${GCP_SERVICE_ACCOUNT}" ]] && [[ ! -z "${GCP_BUCKET_NAME}" ]] &&
gsutil -m cp -R output gs://${GCP_BUCKET_NAME}/commit-${TRAVIS_COMMIT}/output-py || true'
- rm -rf output
- ./bin/o2a-run-all-conversions dot
- ./bin/o2a-generate-index output
- '[[ ! -z "${GCP_SERVICE_ACCOUNT}" ]] && [[ ! -z "${GCP_BUCKET_NAME}" ]] &&
gsutil -m cp -R output gs://${GCP_BUCKET_NAME}/commit-${TRAVIS_COMMIT}/output-dot || true'
- '[[ ! -z "${GCP_SERVICE_ACCOUNT}" ]] && [[ ! -z "${GCP_BUCKET_NAME}" ]] &&
export BUCKET_URL="https://${GCP_BUCKET_NAME}.storage.googleapis.com/commit-${TRAVIS_COMMIT}" &&
echo ================================================================================ &&
echo Build artifacts URls &&
echo ================================================================================ &&
echo "Images: ${BUCKET_URL}/images/index.html" &&
echo "Dot files: ${BUCKET_URL}/output-dot/index.html" &&
echo "Python files: ${BUCKET_URL}/output-py/index.html" || true'
after_success:
- bash <(curl -s https://codecov.io/bash)
before_install:
- '[[ ! -z "${GCP_SERVICE_ACCOUNT}" ]] && [[ ! -z "${GCP_BUCKET_NAME}" ]] &&
gcloud auth activate-service-account --key-file=<(echo "${GCP_SERVICE_ACCOUNT}") || true'