-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
51 lines (51 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
language: go
go:
- "1.15.2"
services:
- mysql
- postgresql
- docker
env:
- AWS_ACCESS_KEY_ID=somekey AWS_SECRET_ACCESS_KEY=somekey PATH=/snap/bin:$PATH CGO_ENABLED=1
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS mouthful_test;'
- sudo mkdir /mnt/ramdisk
- sudo mount -t tmpfs -o size=2048m tmpfs /mnt/ramdisk
- sudo service mysql stop
- sudo service postgresql stop
- sudo mv /var/lib/mysql /mnt/ramdisk
- sudo mv /var/lib/postgresql /mnt/ramdisk
- sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
- sudo ln -s /mnt/ramdisk/postgresql /var/lib/postgresql
- sudo service mysql start
- sudo /etc/init.d/postgresql start
- psql -c 'create database mouthful_test;' -U postgres
- wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz -O /tmp/dynamodb_local_latest.tar.gz
- tar -xzf /tmp/dynamodb_local_latest.tar.gz -C /tmp
- java -Djava.library.path=/tmp/DynamoDBLocal_lib -jar /tmp/DynamoDBLocal.jar -inMemory &
- sudo apt-get -y install gcc-multilib
- sudo apt-get -y install gcc-mingw-w64
- (cd client && npm install)
- (cd admin && npm install)
script:
- ./test.sh
- go build main.go
- go build cmd/spoon/main.go
- (cd admin && npm run build)
- (cd client && npm run build)
after_success:
- bash <(curl -s https://codecov.io/bash)
# this updates the go report card if we're on master
- "test $TRAVIS_BRANCH = 'master' && curl -X POST https://goreportcard.com/checks -H 'cache-control: no-cache' -H 'content-type: application/x-www-form-urlencoded' -d 'repo=github.com%2Fvkuznecovas%2Fmouthful'"
notifications:
email: false
deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash -s -- --debug --skip-validate
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
addons:
hosts:
- dynamodb-local