forked from openedx-unsupported/edx-analytics-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (62 loc) · 2.11 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
language:
- python
python:
- '3.8'
sudo: required
services:
- docker
env:
DATA_API_VERSION: "latest"
before_install:
# Fix intermittent "resource temporarily unavailable" and "write" errors failing the Travis builds.
# See: https://github.com/travis-ci/travis-ci/issues/8920
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
# Start up the relevant services
- docker-compose -f .travis/docker-compose-travis.yml up -d
- docker exec analytics_api bash -c "
source /edx/app/analytics_api/venvs/analytics_api/bin/activate &&
pip install setuptools==49.6.0 &&
make -C /edx/app/analytics_api/analytics_api travis"
# HACK: https://github.com/nodejs/docker-node/issues/1199
- rm package-lock.json
install:
- pip install -r requirements/travis.txt
script:
- docker exec -t -e TRAVIS=1 insights_testing bash -c "
cd /edx/app/insights/edx_analytics_dashboard/ &&
PATH=\$PATH:/edx/app/insights/nodeenvs/insights/bin:/snap/bin &&
make $TARGETS "
matrix:
include:
- env:
TESTNAME=quality-and-js
TARGETS="requirements.js quality validate_js"
after_success:
- codecov --disable pycov
- env:
TESTNAME=a11y
TARGETS="requirements.a11y migrate requirements.js static accept a11y"
- env:
TESTNAME=test-i18n
TARGETS="validate_translations generate_fake_translations"
- env:
TESTNAME=test-python
TARGETS="requirements.js test_python"
after_success:
- docker exec insights_testing /edx/app/insights/edx_analytics_dashboard/.travis/run_coverage.sh
- codecov --disable pycov
after_failure:
# Print the list of running containers to rule out a killed container as a cause of failure
- docker ps
deploy:
- provider: s3
access_key_id: $S3_ACCESS_KEY_ID
secret_access_key: $S3_SECRET_ACCESS_KEY
bucket: $S3_BUCKET
skip_cleanup: true
local_dir: $TRAVIS_BUILD_DIR/build-metrics
upload_dir: edx-analytics-dashboard/master
acl: public_read
on:
branch: master
condition: "$TESTNAME = test-python"