1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/.travis.yml
2020-04-20 15:26:22 -04:00

80 lines
1.5 KiB
YAML

language: go
sudo: required
os:
- linux
go:
- "1.11.x"
- "1.12.x"
- stable
env:
- ANTLR_VERSION=4.8
services:
- docker
addons:
apt:
packages:
- openjdk-9-jre-headless
install:
- go get github.com/mgechev/revive
- sudo curl -o /usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar
- export CLASSPATH=".:/usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar:$CLASSPATH"
- mkdir $HOME/travis-bin
- echo -e '#!/bin/bash\njava -jar /usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar "$@"' > $HOME/travis-bin/antlr
- echo -e '#!/bin/bash\njava org.antlr.v4.gui.TestRig "$@"' > $HOME/travis-bin/grun
- chmod +x $HOME/travis-bin/*
- export PATH=$PATH:$HOME/travis-bin
- export GO111MODULE=on
- git reset --hard
stages:
- install
- lint
- compile
- test
- e2e
- bench
jobs:
include:
- stage: install
go: stable
script:
- make install
- stage: lint
go: stable
script:
- make vet
- make lint
- make fmt
- git diff
- if [[ $(git diff) != '' ]]; then echo 'Invalid formatting!' >&2; exit 1; fi
- stage: compile
go: stable
script:
- make generate
- make compile
- stage: test
script:
- make cover
- stage: e2e
go: stable
before_script:
- docker pull microbox/chromium-headless:77.0.3844.0
- docker run -d -p 9222:9222 microbox/chromium-headless:77.0.3844.0
- docker ps
script:
- make e2e
after_script:
- docker stop $(docker ps -q)
- stage: bench
go: stable
script:
- make bench