2018-09-27 17:58:44 +02:00
|
|
|
language: go
|
|
|
|
|
2018-09-27 19:37:37 +02:00
|
|
|
sudo: required
|
|
|
|
|
|
|
|
os:
|
2018-09-27 23:03:49 +02:00
|
|
|
- linux
|
2018-09-27 18:14:43 +02:00
|
|
|
|
2018-09-27 17:58:44 +02:00
|
|
|
go:
|
2018-10-28 20:07:02 +02:00
|
|
|
- "1.11.x"
|
2019-03-27 23:24:49 +02:00
|
|
|
- "1.12.x"
|
2018-11-09 17:44:41 +02:00
|
|
|
- stable
|
2018-09-27 19:37:37 +02:00
|
|
|
|
|
|
|
addons:
|
2018-09-27 23:03:49 +02:00
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- oracle-java8-set-default
|
2018-10-14 21:38:14 +02:00
|
|
|
chrome: stable
|
2018-09-27 23:03:49 +02:00
|
|
|
|
2019-03-27 23:24:49 +02:00
|
|
|
install:
|
2018-10-05 22:11:28 +02:00
|
|
|
- go get -u github.com/mgechev/revive
|
2018-10-04 11:24:36 +02:00
|
|
|
- sudo curl -o /usr/local/lib/antlr-4.7.1-complete.jar https://www.antlr.org/download/antlr-4.7.1-complete.jar
|
2018-09-27 23:03:49 +02:00
|
|
|
- export CLASSPATH=".:/usr/local/lib/antlr-4.7.1-complete.jar:$CLASSPATH"
|
2018-10-04 11:24:36 +02:00
|
|
|
- mkdir $HOME/travis-bin
|
2018-11-20 03:51:05 +02:00
|
|
|
- echo -e '#!/bin/bash\njava -jar /usr/local/lib/antlr-4.7.1-complete.jar "$@"' > $HOME/travis-bin/antlr
|
2018-10-04 18:27:41 +02:00
|
|
|
- echo -e '#!/bin/bash\njava org.antlr.v4.gui.TestRig "$@"' > $HOME/travis-bin/grun
|
2018-10-04 11:24:36 +02:00
|
|
|
- chmod +x $HOME/travis-bin/*
|
2018-10-05 22:11:28 +02:00
|
|
|
- export PATH=$PATH:$HOME/travis-bin
|
2019-03-27 23:24:49 +02:00
|
|
|
- export GO111MODULE=on
|
2018-10-14 21:38:14 +02:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- lint
|
|
|
|
- compile
|
|
|
|
- test
|
|
|
|
- e2e
|
2018-10-25 01:40:57 +02:00
|
|
|
- bench
|
2018-10-14 21:38:14 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: lint
|
2018-11-07 00:27:35 +02:00
|
|
|
go: stable
|
2018-10-14 21:38:14 +02:00
|
|
|
script:
|
|
|
|
- make vet
|
|
|
|
- make lint
|
2018-11-06 17:16:24 +02:00
|
|
|
- make fmt
|
2019-03-27 23:24:49 +02:00
|
|
|
- git diff
|
|
|
|
- if [[ $(git diff) != '' ]]; then echo 'Invalid formatting!' >&2; exit 1; fi
|
2018-10-14 21:38:14 +02:00
|
|
|
- stage: compile
|
2019-03-16 01:59:05 +02:00
|
|
|
go: stable
|
2018-10-14 21:38:14 +02:00
|
|
|
script:
|
|
|
|
- make generate
|
|
|
|
- make compile
|
|
|
|
- stage: test
|
|
|
|
script:
|
2018-10-17 02:50:06 +02:00
|
|
|
- make cover
|
|
|
|
- stage: e2e
|
2019-03-07 04:52:41 +02:00
|
|
|
go: stable
|
2018-10-17 02:50:06 +02:00
|
|
|
before_script:
|
2018-10-14 21:38:14 +02:00
|
|
|
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 --disable-setuid-sandbox --no-sandbox about:blank &
|
2018-10-17 02:50:06 +02:00
|
|
|
script:
|
2018-10-14 21:38:14 +02:00
|
|
|
- make e2e
|
2018-10-17 02:50:06 +02:00
|
|
|
after_script:
|
2018-10-25 01:40:57 +02:00
|
|
|
- killall google-chrome-stable
|
|
|
|
- stage: bench
|
2019-03-16 01:59:05 +02:00
|
|
|
go: stable
|
2018-10-25 01:40:57 +02:00
|
|
|
script:
|
2018-10-28 20:07:02 +02:00
|
|
|
- make bench
|