This repository has been archived by the owner on Aug 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.travis.yml
70 lines (60 loc) · 2.62 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
services:
- docker
dist: bionic
language: node_js
node_js:
- "lts/*"
env:
- IS_CI_ENV=true
python:
- "3.6.1"
install:
- npm i -g npm
- npm install -g apidoc@0.20.0
- npm run apidoc
- npm install -g eslint
# global eslint uses local plugins
- npm install eslint-plugin-cypress eslint-plugin-no-only-tests
- sudo apt update
- sudo apt install python3-pip
- sudo apt-get install python3-setuptools
- python3 -m pip install -r test/requirements.txt
- docker-compose build
- docker-compose up --force-recreate &> dockerstart.log &
script:
- npm run lint
- black --diff --check ./test
- find . -regextype posix-extended -regex '.*\.(ts|js)$' | egrep -v "(./node_modules/*|./apidoc*|package*.js)" | xargs npx prettier --check || (echo "Please run './beautify.sh' to clean up formatting of files."; false)
- ./wait-for-api || { docker ps; docker-compose logs; exit 1; }
# Apply migration undo and redo to test undo migration
- docker-compose exec server /app/node_modules/.bin/sequelize db:migrate:undo --config /app/config/app_test_default.js --migrations-path /app/migrations
- docker-compose exec server /app/node_modules/.bin/sequelize db:migrate --config /app/config/app_test_default.js --migrations-path /app/migrations
- date
- cd test
- python3 -m pytest --log-api-on-fail
- cd ..
- cd test-cypress
- cp cypress.json.TEMPLATE cypress.json
- npm install
- npm run release
- cd ..
before_deploy:
- version=${TRAVIS_TAG/v/}
# Install nfpm tool (for building debs)
- mkdir /tmp/nfpm
- "curl -sL https://github.com/goreleaser/nfpm/releases/download/v0.9.5/nfpm_0.9.5_Linux_x86_64.tar.gz | tar -C /tmp/nfpm -xzf -"
- export PATH=/tmp/nfpm:$PATH
# Install json tool needed by build script
- npm install -g json
# Build release .deb
- "_release/build.sh ${version}"
deploy:
provider: releases
api_key:
secure: "Wrrc9k+3P7gmogu6AFWxA0HdUFYlfrPObqwBKlKi/2Wi7Ntd3Y3UcaRXMacmcky9Dg7KzNejNNAW6gZTx7z/PJupqtiV2LEl07cBFpfXMp8CgMDNA77T+Cq4wINO9Z1N/fzFUbO/kVTs38UsWlZo0L7NFsr6vBus18OvbV6T/L12ORFe9dRcNZx7bR6pbgeeBFk+BKD2U32/dWQ75VYnBzAX8VkymWabayV1NoGPsEtdv61UQC6AOjXWvqzVvDo2OtIwyTNgun1Be74a4D6XU4PkGygdfepKEa64RoHQbBjMKHebMETmXR7ZSUyC2inUXyM4FP5cut/8tlGgkrEBJo77sVxmDciHYutM9ZjU9+057uMW4axVqkztqvPboyc+0kIyC3/UA1H0Ddyrqrc/38AnTIV/sApxr8oJFzNL8JoJWBUy394moQgMEF1fVlvvoim0S7xRTc0nyWQFZDl1NlEQtZIkeh0m5Hr7etTLFZh5pmO/9AF3rbWY3F1jTWUCci6cNR/c/HpoZQMlEhJQYH6D/Ev0cSp2TVjvBTfsXD2YeLMjyU6CsRerwBCVaokL0BE+w90u8U/OWe7aZsqMEtGt+vo6PkSQmc7MPB88tovMQfRMTSFPJ9gi8MQ8Bo2MJvPVHmRsAvJH2erqqcRUD8v5zsAVY25SY7r1bfmwwNw="
skip_cleanup: true
file_glob: true
file: "dist/*.deb"
on:
tags: true
repo: TheCacophonyProject/cacophony-api