-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis_old.yml
80 lines (72 loc) · 3.27 KB
/
.travis_old.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
services:
- docker
before_install:
- echo $DOCKERHUB_TOKEN | docker login --username $DOCKERHUB_USER --password-stdin
dist: focal
language: node_js
node_js:
- "18"
env:
- IS_CI_ENV=true
install:
- npm install -g --loglevel=error npm [email protected] eslint prettier
- sudo apt update
script:
# Run test checks
- cd types
- npm install --loglevel=error
- npm run lint || travis_terminate 1;
# Run browse checks
- pwd
- cd ../browse
- npm install --loglevel=error @typescript-eslint/parser @typescript-eslint/eslint-plugin
- npm run lint || travis_terminate 1;
# Run api checks
- cd ../api
- npm install --loglevel=error @typescript-eslint/parser @typescript-eslint/eslint-plugin github:TheCacophonyProject/apidoc-plugin-ts#v1.1.0
- npm run lint || travis_terminate 1;
# Run integration checks
- cd ../integration-tests
- npm install --loglevel=error @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-cypress eslint-plugin-no-only-tests
- npm run lint || travis_terminate 1;
# Setup docker for more tests - better to do this after cheapo linting checks, since we can fail earlier.
- cd ..
- docker-compose build
- docker-compose up --force-recreate &> dockerstart.log &
- node ./api/waitForApi.js || { docker ps; docker-compose logs; travis_terminate 1; }
# Apply migration undo and redo to test undo migration
- docker-compose exec server /app/api/node_modules/.bin/sequelize db:migrate:undo --config /app/api/config/app_test_default.js --migrations-path /app/api/migrations
- docker-compose exec server /app/api/node_modules/.bin/sequelize db:migrate --config /app/api/config/app_test_default.js --migrations-path /app/api/migrations
# Run cypress tests
- cd integration-tests
- cp cypress.config.ts.TEMPLATE cypress.config.ts
- npm install --loglevel=error
- npm run release
- cd ../api
# Generate api docs
- npm update --loglevel=error apidoc-plugin-ts
- npm run apidoc || travis_terminate 1;
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
- pwd
- cd ..
# Build api server
# Install json tool needed by build script
- npm install -g json
# Build release .deb
- "_release/build.sh ${version}"
deploy:
provider: releases
api_key:
# cacophony-bot encrypted travis token
secure: "ihRnqcEQl6/F5CDHnMw/UDFQJ6Yx//lJHIyVpFl31BLlaKOxDEBvO4n+3WATpOwUkaNgxn7p3quk+cPTcqGLLCNRTqrZY//6ruXboSIHKOHPxzNHLXOetDzByLdOPmNECZsekUIsKBpjhWEEfBUIIYMnRcDRZfueF5iWZXJxHKZsPDgBuOLFzrAX0oSq/eI1TGpYXGnctQvi1Y7AsEFyrrQ4Lp387ENQELy8Ux8aA69e64AtUy/W2nB1j6rInFvohDb761gyEvEa9JqJur2znXrUoMPDBFL0KXoz+gOMAenPXOpVq6ZuHkM+JeByCB9Y+KrhrZ2g/o1DPtHjcZ2U3IMT2g5/HxWaM3YK7Qjl5nyX2b+vBDFlHyycKQA1Rv8VYoi6E9kIHKyhxRLs2d6b6TExiutcqN9o/N8CCxO255aoLSDzd4qjW116wrA4U7phfls6BTENhEnMNX1jHMiJpi6p/6u4AnGMzGAbVN+L0u4t+X6ta+CjCEIocLcfVNey7CBCEx8M3lLS5tFProEWiqc8F7h82XDqEg/9jv5jodp7U/XC5Dio7KhJ6kxCvOHaHgpOBY1Ur1XKYPs2jCN9dodB97dqkuxFve6O2aTLSPKGNIox2aUqwoPgWZPvDY9SvqHhLK9SE92P+ebRBYnUlzMdfuSmBpZugEOuKoHrASQ="
skip_cleanup: true
file_glob: true
file: "dist/*.deb"
on:
tags: true
repo: TheCacophonyProject/cacophony-web