forked from jadedjester/aristotle-metadata-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
195 lines (173 loc) · 5.57 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
sudo: false
dist: xenial
defaults:
- &main_test_script_py36
language: python
python: 3.6
install:
- pip install codecov coveralls
- pip install 'tox>=3.0'
- nvm install 10.13.0
before_script:
./scripts/main_before_script.sh
script:
./scripts/main_script.sh
services:
- postgresql
- redis-server
- elasticsearch
- mariadb
addons:
postgresql: 9.4
apt:
sources:
- elasticsearch-5.x
packages:
- elasticsearch
- libmariadb-client-lgpl-dev
code_climate:
repo_token: ac63d774ebdd641ef502acf1588b36248726a28a50e4e1f4ba4295a157477f54
mariadb: '10.1'
- &test_accessibility_py36
language: python
python: 3.6
install:
- pip install codecov coveralls
- pip install 'tox>=3.0'
- nvm install 10.13.0
before_script:
./scripts/run_npm_commands.sh
script:
tox -e dj-linux-ally-$ALLY-module_amr
matrix:
include:
# - stage: "Style Check"
# name: "Python Lint"
# language: python
# python: 3.6
# install:
# - pip install codecov coveralls
# - pip install 'tox>=3.0'
# script: tox -e flake8
#
# - name: "Python Type Checking"
# language: python
# python: 3.6
# install:
# - pip install mypy
# script: ./scripts/type.sh
# - name: "JS Lint"
# language: node_js
# node_js: 10
# before_install:
# - cd assets
# install:
# - npm install
# script:
# - npm run lint
# - stage: "Unapplied Migrations"
# name: "Unapplied Django Migrations"
# language: python
# python: 3.6
# env:
# DATABASE_URL="sqlite://:memory:" DJANGO_SETTINGS_MODULE=aristotle_mdr.required_settings
# install:
# - pip install -U setuptools pip pipenv
# - pipenv install --system --deploy --dev
# script: django-admin makemigrations --check
# - stage: "Documentation"
# name: "Documentation"
# language: python
# python: 3.6
# env:
# DATABASE_URL=postgresql://postgres:@localhost/aristotle_test_db
# install:
# - pip install codecov coveralls
# - pip install 'tox>=3.0'
# script: tox -e docs
# # FRONTEND JAVASCRIPT TESTS:
# - stage: "Frontend"
# name: "Javascript Tests"
# language: node_js
# node_js: 10
# before_install:
# - cd assets
# install:
# - npm install
# script:
# - npm run test
# # THESE CONCURRENT JOBS MUST ALWAYS BE RUN FOR THE MAIN ARISTOTLE REPO.
# # THEY INCLUDE OUR USUAL SETUP COMBINATION (POSTGRES DB AND ELASTIC SEARCH ENGINE)
# # MODULES ARE ALSO RUN CONCURRENTLY IN THIS STAGE.
# - stage: "Main tests"
# name: "Aristotle Tests Postgres/Elasticsearch"
# env: DB=postgres SEARCH=elastic MODULE=amr
# <<: *main_test_script_py36
#
# - name: "Dataset Extension Tests"
# env: DB=postgres SEARCH=elastic MODULE=dse
# <<: *main_test_script_py36
#
# - name: "Comet Extension Tests"
# env: DB=postgres SEARCH=elastic MODULE=cir
# <<: *main_test_script_py36
#
# - name: "Graphql Tests"
# env: DB=postgres SEARCH=elastic MODULE=gql
# <<: *main_test_script_py36
#
# - name: "API Tests"
# env: DB=postgres SEARCH=elastic MODULE=api
# <<: *main_test_script_py36
# TODO: disabled for now, but we will look at adding it back in, in the future
# THE FOLLOWING JOBS ARE ONLY RUN IF TYPE OF GIT COMMAND = PUSH:
# THESE TESTS REPRESENT DIFFERENT DATABASE AND SEARCH ENGINE SETUPS FOR ARISTOTLE.
# - stage: "Aristotle Metadata Registry Python Tests (Testing different database and search-engine combinations)."
# name: "Aristotle Tests Sqlite/Elasticsearch"
# if: type = push
# env: DB=sqlite SEARCH=elastic MODULE=amr
# <<: *main_test_script_py36
# - name: "Aristotle Tests Postgres/Whoosh"
# if: type = push
# env: DB=postgres SEARCH=whoosh MODULE=amr
# <<: *main_test_script_py36
# - name: "Aristotle Tests MariaDB/Whoosh"
# if: type = push
# env: DB=mariadb SEARCH=whoosh MODULE=amr
# <<: *main_test_script_py36
# - name: "Aristotle Tests MariaDB/Elasticsearch"
# if: type = push
# env: DB=mariadb SEARCH=elastic MODULE=amr
# <<: *main_test_script_py36
# - name: "Aristotle Tests Sqlite/Whoosh"
# if: type = push
# env: DB=sqlite SEARCH=whoosh MODULE=amr
# <<: *main_test_script_py36
# ACCESSIBILITY TESTS:
- stage: "Accessibility"
name: "Accessibility Tests Metadata Item"
<<: *test_accessibility_py36
env: ALLY=metadata_item MODULE=aristotle-metadata-registry
- name: "Accessibility Tests Metadata Action"
<<: *test_accessibility_py36
env: ALLY=metadata_action MODULE=aristotle-metadata-registry
- name: "Accessibility Tests Static"
<<: *test_accessibility_py36
env: ALLY=static MODULE=aristotle-metadata-registry
# DEPLOYMENT (ONLY IF THE BRANCH IS THE MASTER BRANCH).:
- stage: "Deployment"
name: "Deployment"
if: branch = master
language: python
python: 3.6
install:
- nvm install 10
script: ./scripts/buildandcopy.sh --pypi
after_success:
- ./scripts/coverage_reporter.sh $MODULE
notifications:
webhooks: https://outlook.office.com/webhook/4fa8f482-f261-4599-b76a-ba888c6820aa@1f298417-594f-4f6d-9bdb-8de767590d70/TravisCI/f4b13393a46b434288af9a0b1b2d4db1/1dbc8307-f5fb-45a9-b87f-4e128b5d9895
env:
global:
- AWS_DEFAULT_REGION=ap-southeast-2
- PATH=$HOME/.local/bin:$PATH