-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
72 lines (60 loc) · 1.82 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
language: java
jdk:
#- openjdk8
#- oraclejdk11
- openjdk11
# https://alphahydrae.com/2021/02/how-to-run-postgresql-13-on-travis-ci/
services:
- postgresql
env:
global:
- NODE_VERSION="14.16.1"
- PGPORT=5433
- PGUSER=postgres
jobs:
- DB_PORT=5433 DB_USERNAME=postgres
addons:
postgresql: 13
apt:
packages:
# Ubuntu 16+ does not install libgconf dependency by default, so we need to install it ourselves
- libgconf-2-4
- postgresql-13
- postgresql-client-13
cache:
# Caches $HOME/.npm when npm ci is default script command
# Caches node_modules in all other cases
npm: true
directories:
# we also need to cache folder with Cypress binary
- ~/.cache
before_install:
- nvm install $NODE_VERSION
- npm install cypress
- npm install -D cypress-plugin-tab
# Use trust instead of peer authentication:
- >-
sudo sed -i
-e '/local.*peer/s/postgres/all/'
-e 's/peer\|md5/trust/g'
/etc/postgresql/13/main/pg_hba.conf
# Restart the PostgreSQL service:
- sudo service postgresql@13-main restart
before_script:
- chmod +x ./gradlew
- psql -c 'create database readingbat;' -U postgres
- ./gradlew flywayClean flywayMigrate flywayInfo
# - sudo redis-server /etc/redis/redis.conf --port 6379 --requirepass 'none'
script:
- ./gradlew check #jacocoTestReport
- cd readingbat-core; ../gradlew run --args="-config=src/test/resources/application-travis.conf" &
- sleep 30
- cd /home/travis/build/readingbat/readingbat-core; /home/travis/build/readingbat/readingbat-core/node_modules/.bin/cypress run --record --key 5ee5de19-1e84-4807-a199-5c70fda2fe5d
after_script:
- curl http://0.0.0.0:8080/shutdown
#after_success:
# - bash <(curl -s https://codecov.io/bash)
# - ./gradlew jacocoTestReport coveralls
notifications:
email: